Misra C

Misra C

Una serie di linee guida per lo sviluppo di software per il linguaggio di programmazione C

Embedded coding helps power the systems that are installed into larger devices — such as automobiles, aircraft, or medical devices — and designed to perform a specific dedicated function.

MISRA C is a set of software development guidelines for the C programming language (MISRA C – MISRA).

These rules were developed by The MISRA Consortium with the aim of enhancing code safety, security, portability, and reliability, particularly in embedded systems. The guidelines apply to systems programmed in ISO C / C90 / C99

To know more about MISRA C, its 127 rules, and how to comply with them, is recommended checking out this introduction to MISRA C .

Here are seven steps to comply with MISRA:

1. Know the Rules
You need to know the MISRA coding rules pertinent to which version of C or C++ you’re using.

2. Check Your Code Constantly
Continuously inspecting your code for violations is the best way to improve quality.

3. Set Baselines
Embedded systems come with legacy codebases. By setting baselines, you can focus on making sure your new code is compliant.

4. Prioritize Violations Based on Risk
You could have hundreds or even thousands of violations in your code. That’s why it’s important to prioritize rule violations based on risk severity. Some static code analysis tools can do this for you.

5. Document Your Deviations
Sometimes there are exceptions to the rule. But when it comes to compliance, every rule deviation needs to be well-documented.

6. Monitor Your MISRA Compliance
Keep an eye on how MISRA compliant your code is. Using a static code analyzer makes this easier by automatically generating a compliance report.

7. Choose the Right Static Code Analyzer
Choosing the right static code analyzer makes everything else easy. It takes care of scanning your code — new and legacy — for violations. It prioritizes vulnerabilities based on risk.

0
logo half bottom

© 2007-2024 COMMS.IT S.r.l.U. | Cap. Soc. €10.000,00 I.V. | P. IVA IT09643890016 | Cod. Un. M5UXCR1 | REA TO-1068769