Main Content

针对 MISRA C:2012 编码标准的模型顾问检查

要检查您的模型或子系统可以生成符合 MISRA C:2012 的代码的可能性,请打开模型顾问,并运行按任务 > MISRA C:2012 建模规范中的检查。此外,请考虑使用与 MISRA C:2012 高完整性建模规范相对应的模型顾问检查。有关信息,请参阅MISRA C:2012 合规性注意事项

执行这些检查需要 Embedded Coder®Simulink® Check™

模型顾问检查检查 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