Simplify Compliance Workflows With New C/C++test 2024.2 & AI-Driven Automation | Register Now

ISO 26262 Software Compliance in the Automotive Industry

MISRA C 2023

MISRA C is a set of coding guidelines for the C programming language. The focus of the standard is increasing the safety of software by pre-emptively preventing programmers from making coding mistakes that can lead to runtime failures (and possible safety concerns) by avoiding known problem constructs in the C language.

Over the years, many developers of embedded systems were (and still are) complaining that MISRA C was too stringent of a standard and that the cost of writing fully compliant code was difficult to justify. Realistically, given that MISRA C is applied in safety-critical software, the value of applying the standard to a project depends on factors such as:

  • Risk of a system malfunction because of a software failure
  • Cost of a system failure to the business
  • Development tools and target platform
  • Level of developer’s expertise

Programmers must find a practical middle ground that satisfies the spirit of the standard and still claim MISRA compliance without wasting effort on non-value-added activities.

MISRA C Compliance

In the document, “MISRA Compliance: 2020,” the MISRA Consortium provides the response needed by the community with a well-defined framework of what the statement, “MISRA Compliant,” truly means.

The document helps organizations use a common language articulating the compliance requirements by defining the following artifacts:

Icon inside a blue circle showing a white outline of a guideline checklist.

The Guideline Enforcement Plan 

Demonstrates how each MISRA guideline is verified.

Icon inside a blue circle showing a white outline of a guideline checklist.

The Guideline Re-Categorization Plan

Communicates the agreed-upon severity of individual rules in the guidelines as part of the vendor/client relationship.

Icon inside a blue circle showing a white outline of a guideline checklist.

The Deviations Report

Documents the violations of guidelines with appropriate rationale.

Icon inside a blue circle showing a white outline of a guideline checklist.

The Guidelines Compliance Summary

This is the primary record of overall project compliance.

When first introducing MISRA C into a project, commonly where code already exists, the key document is the guideline re-categorization plan. This document captures all directives, rules, and identifies which categories have been re-categorized. However, it’s important to have the same rational categorization for newly developed code as well. For example, the following diagram shows part of a re-categorization plan.

MISRA Compliance Report
MISRA Compliance Report
The “MISRA C 2023” compliance document recommends against re-categorizations from a less stringent to a more stringent classification. In addition, it is possible to disapply advisory rules altogether after reviewing the types of violations with the team.

The requirement to document deviations is only necessary for all required rules. Any violations in adopted code should be reviewed. Deviations need to clearly state that violations do not compromise safety and security. Regardless of recategorization, if there is a finding that compromises the safety or security of the system, the issue must be fixed. Also, modifications to the existing code may introduce other issues not clearly seen by the developer.

Dark blue banner with image of man talking to woman holding a tablet in hand in a server room.
Image of man and woman with tablet in hand having a discussion in a server room.

Elevate your software testing with Parasoft solutions.