主要内容

适用于 CERT C、SWE 和 ISO/IEC TS 17961 编码标准的模型顾问检查

这些检查用于验证 Embedded Coder® 生成的代码是否符合 CERT C、CWE 和 ISO/IEC TS 17961 (Embedded Coder) 安全编码标准。这些模型顾问检查有助于生成符合 CERT C、CWE 和 ISO/IEC TS 17961 (Embedded Coder) 安全编码标准的代码。

要检查您的代码是否符合 CERT C、CWE 和 ISO/IEC TS 17961 (Embedded Coder) 安全编码标准,请打开模型顾问,并运行按任务 > 安全编码(CERT C、CWE、ISO/IEC TS 17961)建模规范中的检查。

执行这些检查需要 Embedded Coder 或 Simulink® Check™。有些检查要求 Simulink Design Verifier™

安全编码标准模型顾问检查检查 ID
CERT CCWEISO/IEC TS 17961
Check configuration parameters for secure coding standardsmathworks.security.CodeGenSettings
Check for blocks not recommended for C/C++ production code deploymentmathworks.codegen.PCGSupport
Check for blocks not recommended for secure coding standardsmathworks.security.BlockSupport
Check usage of Assignment blocksmathworks.misra.AssignmentBlocks
Check for switch case expressions without a default casemathworks.misra.SwitchDefault
Check for bitwise operations on signed integersmathworks.misra.CompliantCGIRConstructions
Check for equality and inequality operations on floating-point valuesmathworks.misra.CompareFloatEquality
Check integer word lengthsmathworks.misra.IntegerWordLengths

Detect Dead Logic

mathworks.sldv.deadlogic

Detect Integer Overflow

mathworks.sldv.integeroverflow

检测除以零错误

mathworks.sldv.divbyzero

Detect Out Of Bound Array Access

mathworks.sldv.arraybounds

Detect Specified Minimum and Maximum Value Violations

mathworks.sldv.minmax
不适用不适用Check configuration parameters for MISRA C:2012mathworks.misra.CodeGenSettings
不适用不适用

Check usage of Abs blocks

mathworks.hism.hisl_0001
不适用不适用

Check usage of remainder and reciprocal operations

mathworks.sldv.hism.hisl_0002
不适用不适用

Check usage of square root operations

mathworks.hism.hisl_0003
不适用不适用

Check usage of While Iterator blocks

mathworks.hism.hisl_0006
不适用不适用

Check data types for blocks with index signals

mathworks.hism.hisl_0022
不适用不适用

Check usage of Reciprocal Sqrt blocks

mathworks.hism.hisl_0028
不适用不适用

Check global variables in graphical functions

mathworks.hism.hisl_0062
不适用不适用

Check usage of bit-shift operations

mathworks.hism.hisl_0073
不适用不适用

Check safety-related optimization settings for data type conversions

mathworks.hism.hisl_0053
不适用不适用

Check safety-related optimization settings for division arithmetic exceptions

mathworks.hism.hisl_0054
不适用不适用

Check model file name

mathworks.hism.hisl_0031
不适用不适用

Check model object names

mathworks.hism.hisl_0032