Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Configuration Settings

hisl_0060: Configuration parameters that improve MISRA C:2012 compliance

ID: Titlehisl_0060: Configuration parameters that improve MISRA C:2012 compliance
DescriptionTo improve MISRA C:2012 compliance of the generated code,

Set the following model configuration parameters as specified:

Pane / Configuration ParameterValue
Optimization > Simulink and code generation 
   Use division for fixed-point net slope computationon or Use division for reciprocals of integers only
Optimization > Signals and Parameters > Code Generation 
   Bitfield declaratory type specifieruint_T if any of the following Optimization parameters are enabled:
  • Optimization > Signals and Parameters > Code Generation > Pack Boolean data into bitfields

  • Optimization > Stateflow > Code Generation > Use bitsets for storing state configuration

  • Optimization > Stateflow > Code Generation > Use bitsets for storing Boolean data

Diagnostics > Advanced Parameters 
   Model Verification block enablingDisable all
Hardware Implementation > Device details 
   Production hardware signed integer division rounds toZero or Floor
Code Generation > Target selection 
   System target fileERT-based target
Code Generation > Symbols > Auto-generated identifier naming rules 
   Maximum identifier lengthThis should be set to the implementation dependent limit. The default is 31.
   System-generated identifiersShortened
Code Generation > Interface > Software environment 
   Code replacement libraryNone or AUTOSAR 4.0
   Shared code placementShared location
   Support non-finite numbersCleared (off)
   Support complex numbersCleared (off) if you do not need complex number support
   Support continuous timeCleared (off)
Code Generation > Code Style > Code Style 
   Parentheses levelMaximum (Specify precedence with parentheses)
   Replace multiplication by powers of two with signed bitwise shiftsCleared (off)
   Casting modesStandards Compliant
Code Generation > Advanced parameters 
   Generate shared constantsCleared (off)
   Mat-file loggingCleared (off)
   Standard math libraryC89/C90 (ANSI) or C99 (ISO) depending on toolchain
   Support non-inlined S-functionsCleared (off)
   Use dynamic memory allocation for model initialization

Cleared (off)

Only if Code Generation > Interface > Code Interface > Code Interface Packaging is set to Reusable Function

RationaleImprove MISRA C:2012 compliance of the generated code.
Model Advisor Checks

By Product > Embedded Coder > Check configuration parameters for MISRA C:2012 compliance

For check details, see Check configuration parameters for MISRA C:2012 (Embedded Coder).

References
  • MISRA C:2012

Last ChangedR2017a

Was this topic helpful?