MISRA-C:2012 Compliance Goal
Embedded Coder is designed to generate MISRA-C:2012 compliant code when the model is configured correctly. Most MISRA violations in generated code trace back to one of three model issues:
- Untyped data: signals or parameters without explicit types generate casts or promotions that violate MISRA Rule 10.x (essential type model)
- Continuous-time blocks: integrators, derivatives using double by default violate Rule 10.1 (inappropriate essential operands)
- Wrap overflow mode: integer wrap generates code that violates Rule 12.1 (signed integer overflow)
The MISRA-C checker in Embedded Coder Code Generation Report highlights violations with traceable links back to the model block that caused them.