0% found this document useful (0 votes)
160 views2 pages

MISRA C Coding Standards Summary

MISRA C is a set of guidelines for the C programming language aimed at enhancing code safety, portability, and reliability in embedded systems. It includes various rule types and categories, with specific rules to avoid undefined behavior and improve maintainability. Compliance with MISRA C is supported by several static analysis tools and is crucial for reducing runtime errors in safety-critical systems and meeting certification standards.

Uploaded by

sayasudhakarbabu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views2 pages

MISRA C Coding Standards Summary

MISRA C is a set of guidelines for the C programming language aimed at enhancing code safety, portability, and reliability in embedded systems. It includes various rule types and categories, with specific rules to avoid undefined behavior and improve maintainability. Compliance with MISRA C is supported by several static analysis tools and is crucial for reducing runtime errors in safety-critical systems and meeting certification standards.

Uploaded by

sayasudhakarbabu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MISRA C Coding Standards Summary

What is MISRA C?

MISRA C is a set of software development guidelines for the C programming language developed by the

Motor Industry Software Reliability Association (MISRA).

It is intended to facilitate code safety, portability, and reliability in embedded systems.

Key Highlights

- Versions: MISRA C:1998, MISRA C:2004, MISRA C:2012

- Rule Types: Mandatory, Required, Advisory

- Categories: Syntax, Type usage, Control structures, Functions, etc.

- Focus: Avoid undefined behavior, improve maintainability and reliability

Common MISRA C Rules

Example Rules:

1. Rule 1.1: The program shall contain only one 'main' function.

2. Rule 10.1: Operands shall not be of an inappropriate essential type.

3. Rule 11.4: A cast should not be performed between a pointer to object type and a different object type.

4. Rule 15.6: The 'default' label shall appear as the last label in a 'switch' statement.

Tools for MISRA Compliance

Static Analysis Tools for MISRA C Compliance:

- PC-lint / FlexeLint
MISRA C Coding Standards Summary

- Coverity

- LDRA Testbed

- Polyspace

- Klocwork

- Cppcheck (basic MISRA support)

Importance of MISRA C

Why MISRA C Matters:

- Reduces risk of run-time errors in safety-critical systems.

- Encourages defensive and portable programming practices.

- Helps meet certification standards like ISO 26262, DO-178C.

You might also like