Misra C is a coding standard for the C programming language developed by the MISRA Consortium, which includes representation from vehicle manufacturers, component suppliers, and engineering consultancies. It is intended for use in safety-related systems (i.e. those where the failure of the software could result in loss of life or serious injury).
The standard consists of guidelines for the use of C in safety-related systems, organized into rules that are divided into directives and requirements. Directives are meant to be informative, whereas requirements must be followed.
The most recent version was released in 2012 and is known as MISRA-C:2012. It supersedes versions published in 2004 and 1998. The 2012 edition contains 128 rules and 14 directives (the previous editions had 121 rules and 6 directives), with one additional requirement that applies only to TRACE32 products but is listed as MISRA-C:2012 Rule 127.
The MISRA C:2012 Guidelines are now available for free download.
MISRA C is a set of software development guidelines for the C programming language developed by MISRA (Motor Industry Software Reliability Association). These guidelines are intended to support safety, portability and reliability in the development of safety-related automotive electronic systems as well as general embedded applications.
The MISRA C:2012 Guidelines provide a clear and unambiguous set of rules for compliant coding with respect to portability, reliability and maintainability. In addition, they provide useful guidance on how to avoid common pitfalls in C code.
The MISRA C:2004 standard is a set of software development guidelines for the C programming language developed by MISRA (Motor Industry Software Reliability Association). It is designed for use in safety-critical systems.
MISRA C:2004 consists of three documents:
The MISRA C Guidelines, a set of 145 rules, organized into 14 categories, each of which addresses a specific area of potential concern.
The rationale document, which explains the intent behind each rule and suggests how compliance with each rule may be achieved.
The technical Corrigenda document, showing any corrections to the original published standard documents. This document is freely available from this website.
The rules are divided into three levels of severity according to their importance: required (“shall”) mandatory, important (“should”) advisory, and desirable (“may”) advisory. The guideline provides advice on conforming to the rules and there are 138 examples illustrating these rules.
The MISRA C is a document that provides rules and guidelines to avoid “undefined behavior” in the programming language C. This document was created by MISRA (Motor Industry Software Reliability Association), which is a group of companies working in the automotive industry. The main goal of this document is the safety of vehicles.
The MISRA C rules are divided into three parts: mandatory, required and advisory.
Mandatory means that these rules must be applied, if you want to follow the MISRA C standard. They are necessary to make sure that your program meets all basic requirements for safe programming. Required rules are not strictly required because there may be situations where it’s not possible to apply them. However, if you want to follow the MISRA C standard, you should at least try to do so as much as possible. Advisory rules aren’t required either, but they’re recommended for better error prevention.
MISRA stands for Motor Industry Software Reliability Association. It’s a UK-based organization founded by various companies from the British motor industry back in 1998.
MISRA works together with other organizations from different industries, e.g., aerospace or railway systems, etc., and develops guidelines for each of these areas:
MISRA C for
Science is the belief in the ignorance of experts.
— Richard Feynman
In the past, when we looked at new technologies, we assumed that they represented a net gain in resources. Fire gave us heat, metal gave us weapons and tools, oil gave us power and chemicals. All these were an increase in the total amount of energy and materials available to humans.
But information is different. Information is not a material resource: I can tell you something without losing it myself. You can make copies of information without diminishing its value to the original owner. It’s not clear how to measure what you’ve gained by getting some new piece of information–you might have gained a lot or you might have gained nothing at all.
Information technology tends to create information-based industries, whose products are themselves mostly information. So you end up with a situation where every year more and more people sit in front of more and more powerful computers, manipulating more and more data, for longer hours, earning higher wages; but no one can say exactly what wealth has been created by this activity, or who has actually gained from it. This seems like a big problem to me–if we don’t know why people are getting richer, we don’t know if they’re going to stay rich.