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 Standards for MISRA C:2012.
Execution of the below checks requires both Embedded Coder® and Simulink® Check™.
To access the High-Integrity checks supported by the MISRA C:2012 standards, go to By Task > Modeling Standards for MISRA C:2012 > High-Integrity Systems folder.
Note
The High-Integrity modeling guidelines are intended to provide compliance with selected aspects of MISRA C:2012 modeling.
Furthermore, the High-Integrity Systems include sub-folders that contain High-Integrity checks based on their functionality, listed as follows:
By Task > Modeling Standards for MISRA C:2012 > High-Integrity Systems > Configuration
By Task > Modeling Standards for MISRA C:2012 > High-Integrity Systems > MATLAB
Model Advisor Check | Check ID | High-Integrity System Modeling Guidelines |
---|---|---|
Check switch statements in MATLAB Function blocks | mathworks.hism.himl_0007 | himl_0007: MATLAB code switch / case / otherwise patterns |
By Task > Modeling Standards for MISRA C:2012 > High-Integrity Systems > Naming
Model Advisor Check | Check ID | High-Integrity System Modeling Guidelines |
---|---|---|
Check model object names | mathworks.hism.hisl_0032 | hisl_0032: Model element names |
By Task > Modeling Standards for MISRA C:2012 > High-Integrity Systems > Simulink
By Task > Modeling Standards for MISRA C:2012 > High-Integrity Systems > Stateflow
Model Advisor Check | Check ID | High-Integrity System Modeling Guidelines |
---|---|---|
Check Stateflow charts for strong data typing | mathworks.hism.hisf_0015 | hisf_0015: Strong data typing (casting variables and parameters in expressions) |
Check assignment operations in Stateflow Charts | mathworks.hism.hisf_0065 | hisf_0065: Type cast operations in Stateflow to improve code compliance |
Check Stateflow charts for unary operators | mathworks.hism.hisf_0211 | hisf_0211: Protect against use of unary operators in Stateflow Charts to improve code compliance |