112085047 © Monsit Jangariyawong | Dreamstime.com
67c780bf1ce12462b88a95f7 Misra C Promo Txc 112085047 Monsit Jangariyawong

MISRA C/C++ for Writing Better Software

March 5, 2025
Originally developed for safety-critical automotive software, MISRA C/C++ standards have expanded to other areas of the electronics industry.

What you’ll learn

  • What is MISRA C/C++?
  • Why MISRA C/C++ is important for developers.
  • Why MISRA C/C++ isn't just for automotive applications.

 

This TechXchange focuses on MISRA C/C++ content and resources. Check out our poll to see how many are using MISRA C/C++ or similar static-analysis tools.

MISRA C and MISRA C++, MISRA standards for C and C++, respectively, were developed initially to help developers make safe and reliable automotive software. They consist of a set of rules/guidelines that are software best practices which are applicable to any application regardless of their relationship to the automotive space.

MISRA C/C++ was designed to improve the capability of developers to write software that would meet standards such as IEC 61508.2, EN 50128.3, and ISO 262624. For automotive applications, the software must meet Automotive Safety Integrity Level (ASIL) standards, which encompasses various levels from A to D.

MISRA C started up in 1997 by the MISRA Consortium. Support for MISRA C/C++ is found in most commercial static-analysis tools and many commercial C/C++ development suites; some of the rules are incorporated into most C/C++ compilers. Open-source support for MISRA C/C++ is more limited. The ultimate goal is to reduce software errors by making it harder to introduce bugs into applications due to common and well-known problems that are as simple as dealing with uninitiated variables.

MISRA C/C++ Insights

Here are some articles with insights into the specifics about MISRA C and MISRA C++ and why they should be used.

Dreamstime_Suchol-Apiromjit_247578634
Code Dreamstime Suchol Apiromjit 247578634 Promo
Embedded

Don’t Do It: Ignore MISRA C

Complying with these new set of rules and directives will help eliminate coding practices known to be hazardous.
Image
Software

New Version of MISRA C: Why Should You Care?

The newest version of MISRA lets developers take advantage of more C features while helping them mitigate risk for safety-critical automotive, medical, industrial or mil/aero ...
Dreamstime
techxchange_1920_x1080
TechXchange

Electronic Design TechXchange by Category

Check out all our topic-focused TechXchange content collections.

Good Coding Using MISRA C/C++

Articles in this section take a look why MISRA C/C++ are important to creating reliable and secure software.

Image
Embedded

Solve The Software Standards Maze

When you’re developing safety-critical software systems, two categories of standards dictate how you should go about it: process standards and coding standards.
Thinkstock
Programmers
Automotive

MISRA C Isn’t Just for Automotive Applications

MISRA C and its C++ counterpart were originally developed with automotive applications in mind, but they should really be used with any C/C++ development.
0816ldraeepromo.jpg
Software

Safety of Critical Connected Devices is Impossible Without Security

Compliance with a well-defined coding standard such as MISRA should lay a firm foundation for developing secure connected devices that play vital roles in many industries and ...

MISRA C/C++ in Action

These articles take a closer look at tools and platforms that support MISRA C and MISRA C++.

Image
Software

Generate Qualifiable and Tunable Code Using Model-Based Tools

Adacore’s QGen generates qualifiable and tuneable MISRA C or SPARK code based on Mathworks Simulink and Stateflow models.
Iar Risc V Promo Web
alt.embedded

A Hands-On Look at GigaDevice’s RISC-V with IAR’s MISRA C

Editor Bill Wong checks out IAR’s GigaDevice GD32V RISC-V development board. From getting started with the kit to coding, what was the prognosis?
Iar Promo 1
alt.embedded

Testing Out a Safe C Compiler

Editor Bill Wong takes IAR’s MISRA C Embedded Workbench support, including the C-STAT static-analysis tools, for a ride.
Maxkabakov, Dreamstime.com
Dreamstime Maxkabakov 30552642
Automotive

Practical Considerations for MISRA and AUTOSAR Coding Compliance

Automotive is shifting left, introducing safety and security assurances earlier in the development process. We show you how to shift left with MISRA and AUTOSAR code compliance...

MISRA C/C++ Poll

Let us know about how you're using, or considering using, MISRA C/C++.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!