Main Content

Model Advisor Checks for MISRA C:2012 Coding Standards

To check the likelihood that your model or subsystem can generate MISRA C:2012 compliant code, open the Model Advisor and run the checks in By Task > Modeling Guidelines for MISRA C:2012. Also consider using the Model Advisor checks that correspond with the high-integrity modeling guidelines for MISRA C:2012. For information, see MISRA C:2012 Compliance Considerations.

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

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

Check bus object names that are used as bus element names

mathworks.misra.BusElementNames
Check for variant blocks that do not have a default choicemathworks.misra.DefaultChoiceVariantChecks