Main Content

Recommended Settings Summary for Model Configuration Parameters

The following tables summarizes the impact of each configuration parameter on debugging, traceability, efficiency, and safety considerations, and indicates the factory default configuration settings for the ERT target. The Simulink® Coder™ configuration parameters are documented in Recommended Settings Summary for Model Configuration Parameters. For additional details, click the links in the Configuration Parameter column.

Mapping of Application Requirements to the Optimization Pane

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default

Application lifespan (days)

No impact

No impact

Optimal finite value

inf

auto

Optimize using the specified minimum and maximum values

Off

Off

On

No impact

Off

Remove root level I/O zero initialization

No impact

No impact

On (GUI) off (command line) (execution, ROM), No impact (RAM)

No recommendation

On

Remove internal data zero initialization

No impact

No impact

On (execution, ROM)

No recommendation

On

Remove Code from Tunable Parameter Expressions That Saturates Out-of-Range Values

Off

Off

On (execution, ROM)

No recommendation

On

Remove code that protects against division arithmetic exceptions

No impact

No impact

On (execution, ROM)

Off

Off

Pack Boolean data into bitfields

No impact

No Impact

Off (execution, ROM), On (RAM)

No impact

Off

Pass reusable subsystem outputs as

No impact

No impact

Structure reference (ROM), Individual arguments (execution, RAM)

No impact

Individual Arguments

Mapping of Application Requirements to the Code Generation Pane: Memory Sections Parameters

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default
PackageNo impactNo impactNo impactNo impact---None---
Initialize/TerminateNo impactNo impactNo impactNo impactDefault
ExecutionNo impactNo impactNo impactNo impactDefault
Shared utilityNo impactNo impactNo impactNo impactDefault
ConstantsNo impactNo impactNo impactNo impactDefault
Inputs/OutputsNo impactNo impactNo impactNo impactDefault
Internal dataNo impactNo impactNo impactNo impactDefault
ParametersNo impactNo impactNo impactNo impactDefault
Validation resultsNo impactNo impactNo impactNo impactNo package selected.

Mapping of Application Requirements to the Code Generation Pane: Report Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default
Code-to-model

On

On

No impact

No recommendation

Off

Model-to-code

On

On

No impact

No recommendation

Off

Generate model Web view

No impact

No impact

No impact

No impact

Off

Eliminated / virtual blocks

On

On

No impact

No recommendation

Off

Traceable Simulink blocks

On

On

No impact

No recommendation

Off

Traceable Stateflow objects

On

On

No impact

No recommendation

Off

Traceable MATLAB functions

On

On

No impact

No recommendation

Off

Generate static code metrics

No impact

No impact

No impact

No impact

Off

Summarize which blocks triggered code replacements

No impact

No impact

No impact

No impact

Off

Mapping of Application Requirements to the Code Generation Pane: Comments Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default

Simulink block descriptions

On

On

No impact

No impact

On

Simulink data object descriptions

On

On

No impact

No impact

On

Custom comments (MPT objects only)

On

On

No impact

No impact

Off

Custom comments function

Valid file name

Valid file name

No impact

No impact

''

Stateflow object descriptions

On

On

No impact

No impact

On

Requirements in block comments

On

On

No impact

No recommendation

Off

Mapping of Application Requirements to the Code Generation Pane: Identifiers Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default

Global variables

No impact

Use default

No impact

No recommendation

$R$N$M

Global types

No impact

Use default

No impact

No recommendation

&N$R$M_T

Field name of global types

No impact

Use default

No impact

No recommendation

$N$M

Subsystem methods

No impact

Use default

No impact

No recommendation

$R$N$M$F

Subsystem method arguments

No impact

Use default

No impact

No recommendation

rt$I$N$M

Local temporary variables

No impact

Use default

No impact

No recommendation

$N$M

Local block output variables

No impact

Use default

No impact

No recommendation

rtb_$N$M

Constant macros

No impact

Use default

No impact

No recommendation

$R$N$M

Shared utilities identifier format

No impact

Use default

No impact

No recommendation

$N$C

Minimum mangle length

No impact

1

No impact

No impact

1

Maximum identifier length

Valid value

>30No impact>3031

System-generated identifiers

No impact

No impact

No impact

No impact

Shortened

Generate scalar inlined parameters as

No impact

Macros

Literals

No impact

Literals

Use the same reserved names as Simulation Target

No impactNo impactNo impactNo impactOff

Shared checksum length

No impactNo impactNo impactNo impact8

EMX array utility functions identifier format

No impactNo impactNo impactNo recommendationemx$M$N

EMX array types identifier format

No impactNo impactNo impactNo recommendationemxArray_$M$N

Custom token text

No impactSet a custom string and use $U in symbolsNo impactNo impact' '

#define naming

No impact

Force uppercase

No impact

No impact

None

Parameter naming

No impact

Force uppercase

No impact

No impact

None

Signal naming

No impact

Force uppercase

No impact

No impact

None

MATLAB function

No impact

No impact

No impact

No impact

''

Mapping of Application Requirements to the Code Generation Pane: Interface Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default

Support: floating-point numbers

No impact

No impact

Off (GUI), 'on' (command-line) for integer only

No impact

On (GUI), 'off' (command-line)

Support: complex numbers

No impact

No impact

Off for real only

No impact

On

Support: absolute time

No impact

No impact

Off

No recommendation

On

Support: continuous time

No impact

No impact

Off (execution, ROM), No impact (RAM)

No recommendation

Off

Support non-inlined S-functions

No impact

No impact

Off

No recommendation

Off

Support: variable-size signals

No impact

No impact

No impact

No recommendation

Off

Multiword type definitions

No impact

No impact

No impact

No recommendation

System defined

Maximum word length

No impact

No impact

No impact

No recommendation

256 for ERT targets

2048 for GRT targets

Pass root-level I/O as

No impact

No impact

No impact

No impact

Individual arguments

Use dynamic memory allocation for model initialization

No impact

No impact

No impact

No recommendation

Off

Terminate function required

No impact

No impact

No impact

No recommendation

On

Remove error status field in real-time model data structure

Off

No impact

On

No recommendation

Off

Include model types in model class

No impactNo impactOn

No recommendation

On

Combine signal/state structures

Off

No impact

No impact

On

No impact

Generate destructor

No impact

No impact

No impact

No recommendation

On

Use dynamic memory allocation for model block instantiation

No impact

No impact

On

No recommendation

Off

Mapping of Application Requirements to the Code Generation Pane: Verification Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default

Measure task execution time

On

On

Off

No recommendation

Off

Measure function execution times

On

On

Off

No recommendation

Off

Workspace variable

No impact

Valid MATLAB® variable name

No impact

No impact

Off

Save options

All data

All data

Summary data only

No impact

Summary data only

Measure task stack usage

On

On

Off

No recommendation

Off

Stack workspace variable

No impact

Valid MATLAB variable name

No impact

No impact

Off

Third-party tool

BullseyeCoverage or LDRAcover or LDRA tool suite

BullseyeCoverage or LDRAcover or LDRA tool suite

None (code coverage off)

No recommendation

None (code coverage off)

Enable portable word sizes

On

On

Off

No impact

Off

Enable source-level debugging for SIL

On

On

Off

No impact

Off

Mapping of Application Requirements to the Code Generation Pane: Code Style Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default
Parentheses levelNominal (Optimize for readability)Nominal (Optimize for readability)Minimum (Rely on C/C++ operators for precedence)

No recommendation

Nominal (Optimize for readability)
Preserve operand order in expressionOnOnOff

No recommendation

Off
Preserve condition expression in if statementOnOnOff

No recommendation

Off
Convert if-elseif-else patterns to switch-case statementsNo impactOffOn (execution, ROM), No impact (RAM)No impactOn
Preserve extern keyword in function declarationsNo impactNo impactNo impactNo impactOn
Preserve static keyword in function declarationsNo impactNo impactOn (execution, ROM)No impactOn
Suppress generation of default cases for Stateflow switch statements if unreachableOnOnOff

No recommendation

On
Replace multiplications by powers of two with signed bitwise shiftsNo impactNo impactOnNo impactOn
Casting modesNominal Nominal NominalStandards CompliantNominal
Array container typeNo impactNo impactNo impactNo recommendationC-style array
Indent styleK&RK&RK&RK&RK&R
Indent size22222

Mapping of Application Requirements to the Code Generation Pane: Templates Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default
Code templates: Source file (*.c) templateNo impactNo impactNo impactNo impactert_code_template.cgt
Code templates: Header file (*.h) templateNo impactNo impactNo impactNo impactert_code_template.cgt
Data templates: Source file (*.c) templateNo impactNo impactNo impactNo impactert_code_template.cgt
Data templates: Header file (*.h) templateNo impactNo impactNo impactNo impactert_code_template.cgt
File customization templateNo impactNo impactNo impactNo impactexample_file_process.tlc
Generate an example main programNo impactNo impactNo impactNo impactOn
Target operating systemNo impactNo impactNo impactNo impactBareBoardExample

Mapping of Application Requirements to the Code Generation Pane: Code Placement Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default

Data definition

No impact

Valid value

No impact

No impact

Auto

Data definition filename

No impact

Valid value

No impact

No impact

global.c

Data declaration

No impact

Valid value

No impact

No impact

Auto

Data declaration filename

No impact

Valid value

No impact

No impact

global.h

#include file delimiter

No impact

Valid value

No impact

No impact

off

#include file delimiter

No impact

Valid value

No impact

No impact

Auto

Signal display level

No impact

Valid integer

No impact

No impact

10

Parameter tune level

No impact

Valid integer

No impact

No impact

10

File packaging format

No impact

No impact

No impact

No impact

Modular

Mapping of Application Requirements to the Code Generation Pane: Data Type Replacement Tab

Configuration ParameterDebuggingTraceabilityEfficiencySafety precautionFactory Default
Replace data type names in the generated codeNo impactOnNo impactNo impact

Off

Replacement NameNo impactValid character vectorNo impact

No recommendation

''

Related Topics