MISRA-C Training Bootcamp
MISRA-C Training Bootcamp covers details of Motor Industry Software Reliability Association (MISRA) establishment on “C” language reliability guidelines. MISRA-C was established in 1998, as UK’s Motor Industry Software Reliability Association (MISRA) providing a set of 127 guidelines for the use of C in safety-critical systems.
In April 2016 , MISRA Compliance:2016 was established to achieve compliance with
MISRA Coding Guidelines.
Tonex offers a comprehensive 2-day bootcamp on MISRA-C. For detailed outline, CLICK here.
MISRA C has 127 rules: 93 are required and the remaining 34 are advisory. C code that claims conformance to MISRA C must comply with all 93 required rules. Conforming code should adhere to the advisory rules as much as is practical. Example of “Required Rules” vs. “Advisory Rules”
- Rule 1 (required): All code shall conform to ISO 9899 standard C, with no extensions permitted.
- Rule 20 (required): All object and function identifiers shall be declared before use.
- Rule 49 (advisory): Tests of a value against zero should be made explicit, unless the operand is effectively Boolean.
- While rule 49 isn’t going to change much in the way most people write code, rule 104 could have a bigger impact.
- Rule 104 (required): Non-constant pointers to functions shall not be used.
MISRA and ISO 26262
Both MISRA and ISO 26262 play a big role in automotive software development.
ISO 26262 is a functional safety standard that applies to production passenger vehicles up to 3500 kilograms (7716 pounds) and is designed to address possible hazards caused by malfunctioning electronic and electrical systems.
MISRA is a coding standard however ISO 26262 defines methods and measures to ensure that development lifecycle processes and tools avoid or control systematic and random failures in automotive systems:
- Measures such as Automotive Safety Integrity Levels (ASIL)
- Artifacts such as Hazard Analysis and Assessments
ISO 26262 is used to ensure a sufficient and acceptable level of safety is being achieved.
MISRA-C coding standard is all about millions of lines of code in a single vehicle control everything from braking and engine management to central locking assuring safety-critical software. Software failures can lead to recalls, irreparable damage to the brand, and even loss of life.
Two standards that are commonly practiced in these industries are MISRA and ISO 26262. While most engineers are familiar with the names, many of them don’t know exactly what they require. The standards are important for upholding the safety and security of the software. Following the guidelines will help identify and avoid security vulnerabilities in the system.
MISRA is a set of coding guidelines and standards for C/C++ providing a subset of the C and C++ languages for use in safety-critical applications: latest are 140 rules for MISRA–C and over 220 rules for MISRA–C++ covering code safety, portability, and reliability issues related to embedded systems development.
MISRA-C has also been widely adopted for safety-critical development in industries outside of automotive, such as telecom, aerospace, defense, railroad and medical.
Functional Safety standard titled “Road vehicles – Functional safety”, or: ISO 26262 applies to passenger vehicles up to 3500 kilograms (7716 pounds) and addresses potential safety vulnerabilities in electronic and electrical systems, like anti-lock brakes, advanced driver assistance systems (ADAS), engine control units, and digital instrument clusters: sets out requirements for ensuring that systems are designed, implemented, operated, and maintained to provide the required safety integrity level (SIL).
- The development contract
- The software development process
Fundamental elements of compliance
- Guideline classification
- Analysis scope
- The guideline enforcement plan
- Investigating messages
- The role of deviations
- Deviation records
- Deviation permits
- Justifying a deviation
- The guideline re-categorization plan
- The nature of adopted code
- System wide analysis scope
- Adopted binary code
- Adopted source code
- Adopted header files
- The Standard Library
Claiming MISRA compliance
- Staff competence
- The management process
- The guideline compliance summary
- Project delivery
- Example deviation record
- Example deviation permit