MISRA C coding standard

MISRA C is a set of software development guidelines for the C programming language developed by The MISRA Consortium. The aims of MISRA C aare to facilitate code safety, security, portability and reliability in the context of embedded systems, especifically those systems programmed in ISO C / C90 / C99. There is also a set of guidelines for MISRA C++.

MISRA conducts research projects and publishes documents that provide accessible information for engineers and management for writing safe code for embedded systems. MISRA is a collaboration between manufacturers, component suppliers, engineering consultancies and academics which seeks to research and promote best practice in developing safety- and security-related electronic systems and other software-intensive applications.

MISRA C originated when two of the original members of the MISRA project, Ford and Land Rover, became aware they were working separately on coding guidelines for embedded C in automotive systems. Although originally specifically targeted at the automotive industry, MISRA C has evolved as a widely accepted model for best practices by leading developers in sectors including automotive, aerospace, telecom, medical devices, defense, railway, and others.

MISRA C / C ++ – What is it?

I took last week a course on MISRA C to learn about how to use this coding standard for embedded programming.

In order for a piece of software to claim to be compliant to the MISRA C Guidelines, all mandatory rules shall be met and all required rules and directives shall either be met or subject to a formal deviation. Advisory rules may be disapplied without a formal deviation, but this should still be recorded in the project documentation.”

Many MISRA C rules can be characterized as guidelines because under certain condition software engineers may deviate from rules and still be considered compliant with the standard. Deviations must be documented either in the code or in a file.

Links to more information:

MISRA C
https://en.wikipedia.org/wiki/MISRA_C

MISRA
https://misra.org.uk/

MISRA C – Development of safety critical software with ansi/iso c
https://nohau.eu/courses/misra-c-development-of-safety-critical-software/

A GUIDE TO MISRA C CODING STANDARDS
MISRA C and MISRA C++
https://www.perforce.com/resources/qac/misra-c-cpp#:~:text=The%20MISRA%20C%20coding%20standard,%2C%20medical%20devices%2C%20and%20rail.

MISRA C++; MISRA C++:2023 Guidelines for the use C++:17 in critical systems
Published in October 2023, this is the latest and current edition of MISRA C++. It is specifically targetting the 2017 language version (C++:17) as defined by ISO/IEC 14882:2017.
https://misra.org.uk/misra-cpp2023-released-including-hardcopy/

MISRA C / C ++ – What is it?
https://www.youtube.com/watch?v=PaDfrHqWg5A

Sonar supports latest MISRA C++ 2023 guidelines
https://www.sonarsource.com/knowledge/languages/cpp/misra-cpp-2023/?gads_campaign=SC-Hroi-PMax&gads_ad_group=Global&gads_keyword=&gad_source=1&gclid=EAIaIQobChMItvu5j6GFgwMVp2SRBR0XfggMEAAYASAAEgJf5_D_BwE

Learn about MISRA C++ 2023
In the world of embedded software, the significance of MISRA coding guidelines in ensuring compliance for safety-critical systems is paramount. Download MISRA C++ 2023 Guidelines explained for an insightful understanding of MISRA, its influential coding guidelines, and the role of static analysis in refining code for embedded systems.
https://assets-eu-01.kc-usercontent.com/14a55959-a51a-01d5-d7c0-1d06e516432a/f6ad390a-1b79-4d93-a1e0-64dc54605677/Misra%20Cpp_1023.pdf

A Rationale-Based Classification of MISRA C Guidelines
https://www.youtube.com/watch?v=rBwC9S0uuWM

An Introduction to MISRA C:2012 & Mandatory Guideline Violations in Linux
https://www.youtube.com/watch?v=eGTMHf9r3qY

Understanding Implementation-Defined Behavior in C and C++
https://www.youtube.com/watch?v=JqdDbB07RUo

MISRA Deviation Permits: Giant Time and Money Savers
https://www.youtube.com/watch?v=qsUt-PxmnG0

MISRA C in the ISO 26262 Context I #automotive #ESSS21
https://www.youtube.com/watch?v=Mrf7rIJxgI8

SAS2018 – The Misra C Coding Standard and its Role in the Development (by Roberto Bagnara)
https://www.youtube.com/watch?v=LCZotsYizRI

A GUIDE TO MISRA C CODING STANDARDS
MISRA C and MISRA C++
https://www.perforce.com/resources/qac/misra-c-cpp

3 Comments

  1. Hello world says:

    Thank you for sharing this .. Can you explain c++ ?

    Reply
  2. Tomi Engdahl says:

    Home > Articles > Programming > C/C++
    Secure Coding in C and C++: Strings and Buffer Overflows
    Apr 24, 2013
    https://www.informit.com/articles/article.aspx?p=2036582&seqNum=3&fbclid=IwAR1R9hQ4SO-GFBzl2lnYIxcYFdqR-91oNySemCRd0q6iZhlNlqyeKc1Hny8

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*