Sunday, September 27, 2020

Overview of MISRA-C v1.0 Guidelines for Embedded Software Engineers-Part 1

 MISRA-C ( Motor Industry Software Reliability Association )  v 1.0 is set of rules or guidelines for how to use C Language in vehicle or automotive  industry software and includes safety integrity level 3.  In 1998 first version was released.

It also explains the reason why MISRA-C guidelines is required and talks about how programmers should  use in development of software. It explains about C language issues and apart from that for reliability of code what needs to be done so developer can says they have followed "standard practice" for development of code. 

In any programming languages there is no assurance that whatever programmer wanted to do code will executes exactly the same. There is always some minor issues/bugs/errors/overflow arises which creates always some runtime or compile time issue which developers can't predict or see at first place which are listed below:

1. Developers always do mistakes in writing code.C have various style and expression which can be used to write neat and clean and user understandable code and it also can be used for either way and in which it can be hard to understand code what is it used for. Such writing practice is not good for safety critical system software applications. Syntax of C can also cause errors. C also weak in "type checking" of any variable type like forcefully store float into int for compatibility which is wrong and will not raise error.

2. Operator precedence is easy to misunderstands by developer. There are many areas where developer can be easily misread the operator and can cause issues.

3. Compiler doesn't always do what is expected to be asked by developers.  C language have some features which are ambiguous and can be behaves bit differently and it varies from compiler to compiler specially when developer wants to port code from one compiler to another here at least C standard list that issues so developer can know it.    

4. Even compilers can have errors itself.  Because compiler itself is a software tool and may not necessary it always compiles the code correctly in certain situations and could have some bugs. Reason behind is that C standards can be misunderstand by compiler writers and so write wrong way. Sometimes compiler writers chooses to write code different from standard in some areas of language which is prone to errors.  

5. Well known run time errors. C language doesn't provide runtime errors like arithmetic exceptions like divide by zero, buffer overflow, valid address for pointers, and array boundary overflow errors.


Use of C language in design of safety critical applications.


From above sections explained issues in C programming care must be taken to design system in which safety is a highest priority. However C is widely used and mature enough to be used because there is many commercially available testing tool available to statically analyse and detect errors as explained above. But in case if somebody want to use better than C language in safety critical application there is two such language is available name is Ada and Modula 2. While Assembly language is worse than C for Safety critical application and if one wants to use it need to adhere strict guidelines.

                                                                                                     To be continued... 


Wednesday, August 19, 2015

Wednesday, June 3, 2015

Bluetooth programming services, android bluetooth programming, bluetooth coding in java

Bluetooth programming services

XE has been a leading one stop provider of hardware and software solutions for the embedded realtime systems market.XE together with its associate companies, possesses in-depth expertise and vast experience with real-time embedded systems and development tools, has succeeded in bringing to fore an ecosystem of highly integrated hardware and software solutions, tools and products ranging from Development Suites, Middleware Solutions, In Circuit Debuggers and Emulators, Connectivity Solutions, Protocol Analyzers and Hardware Subsystems to holistically support design, development and debugging processes in Embedded Systems.
Development Environment & Platforms
Android SDK/NDK, Dynamic C, AtmelStudio, Code Composer Studio,Linux-GCC,IAR Embedded Workbench, AVR Studio, Visual Studio,GitHub-Repo,Visual Basic 6.0,MPLAB,Arduino, Visual C++,Code Warrior.
Operating System
Linux Kernel, Windows MFC API, Android NDK,Real Time Operating Systems(RTOs), MicroC OS-II,U-boot,etc
Protocols
UART,USART,USB,CAN,Ethernet,DeviceNet,Modbus,TCP-IP,Bluetooth,Wifi,RF,Zigbee
Bluetooth programming services, android bluetooth programming, bluetooth programming windows, bluetooth programming in python, bluetooth programming in java, j2me bluetooth application, bluetooth coding in java
Skype: xtint.technology
Tel -  +91-9173929262    

Thursday, January 22, 2015

String Delimiter Program for Arduino Platform

An arduino sketch for parsing strings is required in general firmware.
Here it is a bsic structure of code is proposed to delimit the string of  bytes by Colon(:).

For, Example

Series of Data comming is in row of "12:123:23:45:8283:9474758:94848:28373:848:3834:89485:384:8484:9494949:9"

Then to retrieve or parse each individual value of data the code is proposed based on inbuilt functions used from arduino library.


Fig 1




Fig 2.

Code has been tested on Arduino Mega2560 Board. Fig 2. shows sample code with output.
If you want to have sketch  please write one mail to me at xtint.technologies@gmail.com.

http://www.xtint.us                                       https://www.facebook.com/Xtintt
xtint.technologies@gmail.com                     https://twitter.com/dhavalpateel
Skype: xtint.technology                                https://plus.google.com/u/0/+DhavalPatelFirmwareProgrammer    
+91-9173-929262                                         in.linkedin.com/in/dhavalnpatel/