Main Content

Model Checks for MISRA C:2012 Compliance

To check that your model or subsystem has a likelihood of generating MISRA C:2012 compliant code, open the Model Advisor and run the checks in By Task > Modeling Guidelines for MISRA C:2012.

Model Advisor Checks for MISRA C:2012 Coding Standards

These Model Advisor checks improve the likelihood of generating code that complies with MISRA C:2012 coding standards.

Execution of these checks requires either Embedded Coder® or Simulink® Check™.

Model Advisor CheckCheck ID
Check usage of Assignment blocksmathworks.misra.AssignmentBlocks
Check for blocks not recommended for MISRA C:2012mathworks.misra.BlkSupport
Check for blocks not recommended for C/C++ production code deploymentmathworks.codegen.PCGSupport
Check for unsupported block namesmathworks.misra.BlockNames
Check configuration parameters for MISRA C:2012mathworks.misra.CodeGenSettings
Check for equality and inequality operations on floating-point valuesmathworks.misra.CompareFloatEquality
Check for bitwise operations on signed integersmathworks.misra.CompliantCGIRConstructions
Check for recursive function callsmathworks.misra.RecursionCompliance
Check for switch case expressions without a default casemathworks.misra.SwitchDefault
Check for missing error ports for AUTOSAR receiver interfacesmathworks.misra.AutosarReceiverInterface
Check for missing const qualifiers in model functionsmathworks.misra.ModelFunctionInterface
Check integer word lengthmathworks.misra.IntegerWordLengths

Check bus object names that are used as bus element names


Related Topics