Create an Embedded Coder code generation configuration
object.
Set properties that might impact MISRA compliance.
The function coder.setupMISRAConfig
sets property
values according to the values shown in the table.
Property | Value for Improved MISRA Compliance |
---|
CastingMode | 'Standards' |
CppNamespace | Valid namespace name for C++ |
DataTypeReplacement | 'CoderTypedefs' |
DynamicMemoryAllocation | 'Off' |
EnableRuntimeRecursion | false |
EnableSignedLeftShifts | false |
EnableSignedRightShifts | false |
GenerateDefaultInSwitch | true |
ParenthesesLevel | 'Maximum' |
TargetLangStandard
| 'C99 (ISO)' for C, 'C++03
(ISO)' for C++ |
If the CppNamespace
property is unset, and the
TargetLang
property is 'C++'
, then
coder.setupMISRAConfig
sets the
CppNamespace
property to a default character vector,
'Codegen'
. Modify this value to a namespace name that
is particular to your project.