Skip to Main Content Skip to Search
Product Documentation

Parameter Reference

Recommended Settings Summary

The following table summarizes the impact of each configuration parameter on debugging, traceability, efficiency, and safety considerations, and indicates the factory default configuration settings for the GRT and ERT targets, unless otherwise specified.

For parameters that are available only when an ERT target is specified, see the Recommended Settings Summary in the Embedded Coder documentation.

For additional details, click the links in the Configuration Parameter column.

Mapping Application Requirements to the Solver Pane

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Start Time

No impact

No impact

No impact

0.0

0.0 seconds

Stop time

No impact

No impact

No impact

Any positive value

10.0 seconds

Type

Fixed-step

Fixed-step

Fixed-step

Fixed-step

Variable-step (you must change to Fixed-step for code generation)

Solver

No impact

No impact

No impact

Discrete (no continuous states)

ode3 (Bogacki-Shampine)

Periodic sample time constraint

No impact

No impact

No impact

Specified or Ensure sample time independent

Unconstrained

Sample time properties

No impact

No impact

No impact

Period, offset, and priority of each sample time in the model; faster sample times must have higher priority than slower sample times

''

Tasking mode for periodic sample times

No impact

No impact

No impact

No impact

Auto

Automatically handle rate transition for data transfer

No impact

No impact (for simulation and during development)

Off (for production code generation)

No impact

Off

Off

Mapping Application Requirements to the Data Import/Export Pane

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Input

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

Off

Initial state

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

Off

Time

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

On

States

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

Off

Output

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

On

Final states

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

Off

Signal logging

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

On

Record and inspect simulation output

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

Off

Limit data points to last

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

On

Decimation

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

1

Format

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

Array

Output options

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

Refine output

Refine factor

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

1

Output times

No impact

No impact

No impact

No impact (GRT)

Off (ERT)

'[]'

Mapping Application Requirements to the Optimization Pane: General Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Block reduction

Off (GRT)

No impact (ERT)

Off

On

Off

On

Implement logic signals as Boolean data (vs. double)

No impact

No impact

On

On

On

Conditional input branch execution

No impact

On

On (execution)

No impact (ROM, RAM)

Off

On

Application lifespan (days)

No impact

No impact

Finite value

inf

inf

Use memset to initialize floats and doubles to 0.0

No impact

No impact

On* (execution, ROM)

No impact (RAM)

No impact

On

Use floating-point multiplication to handle net slope corrections

No impact

No impact

On (when target hardware supports efficient multiplication)
Off (otherwise)

Off

Off

Remove code from floating-point to integer conversions that wraps out-of-range values

Off

Off

On (execution, ROM)

No impact (RAM)

Off (GRT)

On (ERT)

Off

Remove code from floating-point to integer conversions with saturation that maps NaN to zero

Off

Off

On

Off (GRT)

On (ERT)

On

*The command-line value is reverse of the listed value.

Mapping Application Requirements to the Optimization Pane: Signals and Parameters Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Inline parameters

Off (GRT)

On (ERT)

On

On

No impact

Off

Signal storage reuse

Off

Off

On

No impact

On

Enable local block outputs

Off

No impact

On

No impact

On

Eliminate superfluous local variables (Expression folding)

Off

No impact (GRT)

Off (ERT)

On

No impact

On

Minimize data copies between local and global variables

Off

Off

No impact (execution)

On (ROM, RAM)

No impact

Off

Loop unrolling threshold

No impact

No impact

>0

>1

5

Maximum stack size (bytes)

No impact

No impact

No impact

No impact

Inherit from target

Use memcpy for vector assignment

No impact

No impact

On

No impact

On

Memcpy threshold (bytes)

No impact

No impact

Accept default or determine target-specific optimal value

No impact

64

Reuse block outputs

Off

Off

On

No impact

On

Inline invariant signals

Off

Off

On

No impact

Off

Mapping Application Requirements to the Optimization Pane: Stateflow Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Use bitsets for storing state configuration

Off

Off

Off (execution, ROM)

On (RAM)

No impact

Off

Use bitsets for storing Boolean data

Off

Off

Off (execution, ROM)

On (RAM)

No impact

Off

Mapping Application Requirements to the Diagnostics Pane: Solver Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Algebraic loop

error

No impact

No impact

error

warning

Minimize algebraic loop

No impact

No impact

No impact

error

warning

Block priority violation

No impact

No impact

No impact

error

warning

Consecutive zero-crossings violation

No impact

No impact

No impact

warning or error

error

Unspecified inheritability of sample time

No impact

No impact

No impact

error

warning

Solver data inconsistency

warning

No impact

none

No impact

warning

Automatic solver parameter selection

No impact

No impact

No impact

error

warning

Mapping Application Requirements to the Diagnostics Pane: Sample Time Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Source block specifies -1 sample time

No impact

No impact

No impact

error

none

Discrete used as continuous

No impact

No impact

No impact

error

warning

Multitask rate transition

No impact

No impact

No impact

error

error

Single task rate transition

No impact

No impact

No impact

none or error

none

Multitask conditionally executed subsystem

No impact

No impact

No impact

error

error

Tasks with equal priority

No impact

No impact

No impact

none or error

warning

Enforce sample times specified by Signal Specification blocks

No impact

No impact

No impact

error

warning

Mapping Application Requirements to the Diagnostics Pane: Data Validity Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Signal resolution

No impact

No impact

No impact

Explicit only

Explicit only

Division by singular matrix

No impact

No impact

No impact

error

none

Underspecified data types

No impact

No impact

No impact

error

none

Simulation range checking

warning or error

warning or error

none

error

none

Detect overflow

No impact

No impact

No impact

error

warning

Inf or NaN block output

No impact

No impact

No impact

error

none

"rt" prefix for identifiers

No impact

No impact

No impact

error

error

Detect downcast

No impact

No impact

No impact

error

error

Detect overflow

No impact

No impact

No impact

error

error

Detect underflow

No impact

No impact

No impact

error

none

Detect precision loss

No impact

No impact

No impact

error

error

Detect loss of tunability

No impact

No impact

No impact

error

none

Detect read before write

No impact

No impact

No impact

error

Enable all as warnings

Detect write after read

No impact

No impact

No impact

error

Enable all as warning

Detect write after write

No impact

No impact

No impact

error

Enable all as errors

Multitask data store

No impact

No impact

No impact

error

warning

Duplicate data store names

warning

No impact

none

No impact

none

Check undefined subsystem initial output

No impact

No impact

No impact

On

On

Check preactivation output of execution context

No impact

No impact

No impact

On

Off

Check runtime output of execution context

No impact

No impact

No impact

On

Off

Model Verification block enabling

No impact

No impact

No impact

No impact (GRT)

Disable all (ERT)

Use local settings

Mapping Application Requirements to the Diagnostics Pane: Type Conversion Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Unnecessary type conversions

No impact

No impact

No impact

warning

none

Vector/matrix block input conversion

No impact

No impact

No impact

error

none

32-bit integer to single precision float conversion

No impact

No impact

No impact

warning

warning

Mapping Application Requirements to the Diagnostics Pane: Connectivity Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Signal label mismatch

No impact

No impact

No impact

error

none

Unconnected block input ports

No impact

No impact

No impact

error

warning

Unconnected block output ports

No impact

No impact

No impact

error

warning

Unconnected line

No impact

No impact

No impact

error

none

Unspecified bus object at root Outport block

No impact

No impact

No impact

error

warning

Element name mismatch

No impact

No impact

No impact

error

warning

Mux blocks used to create bus signals

No impact

No impact

No impact

error

warning

Bus signal treated as vector

No impact

No impact

No impact

error

warning

Invalid function-call connection

No impact

No impact

No impact

error

error

Context-dependent inputs

No impact

No impact

No impact

Enable all

Use local settings

Mapping Application Requirements to the Diagnostics Pane: Compatibility Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

S-function upgrades needed

No impact

No impact

No impact

error

none

Mapping Application Requirements to the Diagnostics Pane: Model Referencing Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Model block version mismatch

No impact

No impact

No impact

none

none

Port and parameter mismatch

No impact

No impact

No impact

error

none

Model configuration mismatch

No impact

No impact

No impact

warning

none

Invalid root Inport/Outport block connection

No impact

No impact

No impact

error

none

Unsupported data logging

No impact

No impact

No impact

error

warning

Mapping Application Requirements to the Diagnostics Pane: Saving Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Block diagram contains disabled library links

No impact

No impact

No impact

No impact

warning

Block diagram contains parameterized library links

No impact

No impact

No impact

No impact

none

Mapping Application Requirements to the Diagnostics Pane: Stateflow Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Unused data and events

warning

No impact

No impact (for simulation and during development)

none (for production code generation)

warning

warning

Unexpected backtracking

warning

No impact

No impact

error

warning

Invalid input data access in chart initialization

warning

No impact

No impact

error

warning

No unconditional default transitions

warning

No impact

No impact (for simulation and during development)

none (for production code generation)

error

warning

Transition outside natural parent

warning

No impact

No impact (for simulation and during development)

none (for production code generation)

error

warning

Mapping Application Requirements to the Hardware Implementation Pane

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Device vendor

No impactNo impactNo impactNo impact

Generic

Device type

No impact

No impact

No impact

No impact

Unspecified (assume 32–bit Generic)

Number of bits

No impact

No impact

Target specific

No impact for simulation and during development

Match operation of compiler and hardware for code generation

char 8, short 16, int 32, long 32, native 32

Largest atomic size

No impact

No impact

Target specific

No impact for simulation and during development

Match operation of compiler and hardware for code generation

integer Char, floating-point None

Byte ordering

No impact

No impact

No impact

No impact

Unspecified

Signed integer division rounds to

No impact for simulation and during development

Undefined for production code generation

No impact for simulation and during development

Zero or Floor for production code generation

No impact for simulation and during development

Zero for production code generation

No impact for simulation and during development

Floor for production code generation

Undefined

Shift right on a signed integer as arithmetic shift

No impact

No impact

On

No impact

On

Emulation hardware (code generation only)

No impact

No impact

No impact

No impact

On

Mapping Application Requirements to the Model Referencing Pane

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Rebuild

No impact

No impact

No impact

If any changes detected or Never

If you use the Never setting, then set the Never rebuild diagnostic parameter to Error if rebuild required

If any changes detected

Never rebuild diagnostic

No impact

No impact

No impact

error if rebuild requirederror if rebuild required

Enable parallel model reference builds

No impact

No impact

No impact

No impact

Off

MATLAB worker initialization for builds

No impact

No impact

No impact

No impact

None

Total number of instances allowed per top model

No impact

No impact

No impact

No impact

Multiple

Pass fixed-size scalar root inputs by value for code generation

No impact

No impact

No impact

Off

Off

Minimize algebraic loop occurrences

No impact

No impact

No impact

Off

Off

Propagate sizes of variable-size signals

No impact

No impact

No impact

Off

Infer from blocks in model

Model dependencies

No impact

No impact

No impact

No impact

''

Mapping Application Requirements to the Simulation Target Pane: General Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Enable debugging/animation

On

No impact

Off

On

On

Enable overflow detection (with debugging)

On

No impact

Off

On

On

Ensure memory integrity

On

On

Off

On

On

Echo expressions without semicolons

On

No impact

Off

No impact

On

Use BLAS library for faster simulation

No impact

No impact

On

No impact

On

Ensure responsiveness

On

On

Off

On

On

Simulation target build mode

No impact

No impact

No impact

No impact

Incremental build

Mapping Application Requirements to the Simulation Target Pane: Symbols Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Reserved names

No impact

No impact

No impact

No impact

{}

Mapping Application Requirements to the Simulation Target Pane: Custom Code Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Parse custom code symbols

On

No impact

No impact

On

On

Source file

No impact

No impact

No impact

No impact

''

Header file

No impact

No impact

No impact

No impact

''

Initialize function

No impact

No impact

No impact

No impact

''

Terminate function

No impact

No impact

No impact

No impact

''

Include directories

No impact

No impact

No impact

No impact

''

Source files

No impact

No impact

No impact

No impact

''

Libraries

No impact

No impact

No impact

No impact

''

Mapping Application Requirements to the Code Generation Pane: General Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

System target file

No impact

No impact

No impact

No impact (GRT)

ERT based (ERT)

grt.tlc

Language

No impact

No impact

No impact

No impact

C

Compiler optimization level

Optimizations off (faster builds)

Optimizations off (faster builds)

Optimizations on (faster runs) (execution)

No impact (ROM, RAM)

No impact

Optimizations off (faster builds)

Custom compiler optimization flags

Optimizations off (faster builds)

Optimizations off (faster builds)

Optimizations on (faster runs)

No impact

Optimizations off (faster builds)

TLC options

No impact

No impact

No impact

No impact

''

Generate makefile

No impact

No impact

No impact

No impact

On

Make command

No impact

No impact

No impact

make_rtw

make_rtw

Template makefile

No impact

No impact

No impact

No impact

grt_default_tmf

Select objective

DebuggingNot applicable for GRT-based targetsExecution efficiencyNot applicable for GRT-based targetsUnspecified
Check model before generating codeOn (proceed with warnings) or On (stop for warnings)On (proceed with warnings) or On (stop for warnings)On (proceed with warnings) or On (stop for warnings)On (proceed with warnings) or On (stop for warnings)Off

Generate code only

Off

No impact

No impact

No impact

Off

Mapping Application Requirements to the Code Generation Pane: Report Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precautions

Create code generation report

On

On

No impact

On

Off

Open report automatically

On

On

No impact

No impact

Off

Mapping Application Requirements to the Code Generation Pane: Comments Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Include comments

On

On

No impact

On

On

Simulink block / Stateflow object comments

On

On

No impact

On

On

Show eliminated blocks

On

On

No impact

On

Off

Verbose comments for Simulink Global storage class

On

On

No impact

On

Off

Mapping Application Requirements to the Code Generation Pane: Symbols Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Maximum identifier length

Any valid value

>30

No impact

>30

31

Use the same reserved names as Simulation Target

No impact

No impact

No impact

No impact

Off

Reserved names

No impact

No impact

No impact

No impact

{}

Mapping Application Requirements to the Code Generation Pane: Custom Code Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Use the same custom code settings as Simulation Target

No impact

No impact

No impact

No impact

Off

Source file

No impact

No impact

No impact

No impact

''

Header file

No impact

No impact

No impact

No impact

''

Initialize function

No impact

No impact

No impact

No impact

''

Terminate function

No impact

No impact

No impact

No impact

''

Include directories

No impact

No impact

No impact

No impact

''

Source files

No impact

No impact

No impact

No impact

''

Libraries

No impact

No impact

No impact

No impact

''

Mapping Application Requirements to the Code Generation Pane: Debug Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Verbose build

On

No impact

No impact

On

On

Retain .rtw file

On

No impact

No impact

No impact

Off

Profile TLC

On

No impact

No impact

No impact

Off

Start TLC debugger when generating code

On

No impact

No impact

No impact

Off

Start TLC coverage when generating code

On

No impact

No impact

No impact

Off

Enable TLC assertion

On

No impact

No impact

On

Off

Mapping Application Requirements to the Code Generation Pane: Interface Tab

Configuration ParameterSettings for Building CodeFactory Default
DebuggingTraceabilityEfficiencySafety Precaution

Code replacement library

No impact

No impact

Any valid value

No impact

C89/C90 (ANSI)

Shared code placement

Shared location (GRT)

No impact (ERT)

Shared location (GRT)

No impact (ERT)

No impact (execution, RAM)

Shared location (ROM)

No impact

Auto

Support non-finite numbers

No impact

No impact

Off (Execution, ROM)

No impact (RAM)

Off

On

Classic call interface

No impact

Off

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

Off

Off (except On for GRT models created before R2012a)

MAT-file logging

On

No impact

Off

Off

On (GRT)

Off (ERT)

MAT-file variable name modifier

No impact

No impact

No impact

No impact

rt_

Interface

No impact

No impact

No impact

No impact (GRT)

None (ERT)

None

Generate C API for: signals

No impact

No impact

No impact

No impact

On

Generate C API for: parameters

No impact

No impact

No impact

No impact

On

Generate C API for: states

No impact

No impact

No impact

No impact

Off

Transport layer

No impact

No impact

No impact

No impact

tcpip

MEX-file arguments

No impact

No impact

No impact

No impact

''

Static memory allocation

No impact

No impact

No impact

No impact

Off

Static memory buffer size

No impact

No impact

No impact

No impact

1000000

Parameter Command-Line Information Summary

The following table lists Simulink Coder parameters that you can use to tune model and target configurations. The table provides brief descriptions, valid values (bold type highlights defaults), and a mapping to Configuration Parameter dialog box equivalents. For descriptions of the panes and options in that dialog box, see Configuration Parameters in the Simulink Coder documentation.

Use the get_param and set_param commands to retrieve and set the values of the parameters on the MATLAB command line or programmatically in scripts.

The Configuration Wizard in the Embedded Coder product provides buttons and scripts for customizing code generation. See Use Configuration Wizard Blocks in the Embedded Coder documentation for information on using Configuration Wizard features.

For information about Simulink parameters, see Configuration Parameters Dialog Box in the Simulink documentation. For information on using get_param and set_param to tune the parameters for various model configurations, see Tune Parameters.

For parameters that are specific to the ERT target, or targets based on the ERT target, see Parameter Command-Line Information Summary in the Embedded Coder documentation.

Command-Line Information: Optimization Pane: General Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
BooleanDataType
off,
on
Optimization > Implement logic signals as Boolean data (vs. double)Control the output data type of blocks that generate logic signals.
EfficientFloat2IntCast
off, on
Optimization > Remove code from floating-point to integer conversions that wrap out-of-range valuesRemove wrapping code that handles out-of-range floating-point to integer conversion results.
EfficientMapNaN2IntZero
off, on
Optimization > Remove code from floating-point to integer conversions with saturation that maps NaN to zeroRemove code that handles floating-point to integer conversion results for NaN values.
InitFltsAndDblsToZero
off, on
Optimization > Use memset to initialize floats and doubles to 0.0Optimize initialization of storage for float and double values. Set this option if the representation of floating-point zero used by your compiler and target CPU is identical to the integer bit pattern 0.
LifeSpan
string
Optimization > Application lifespan (days)Optimize the size of counters used to compute absolute and elapsed time, using the specified application life span value.
NoFixptDivByZeroProtection (Simulink Fixed Point)
off, on
Optimization > Remove code that protects against division arithmetic exceptionsSuppress generation of code that guards against division by zero for fixed-point data.
UseFloatMulNetSlope (Simulink Fixed Point)
off, on
Optimization > Use floating-point multiplication to handle net slope correctionsUse floating-point multiplication to perform net slope correction for floating-point to fixed-point casts.
UseIntDivNetSlope (Simulink Fixed Point)
off, on
Optimization > Use integer division to handle net slopes that are reciprocals of integersPerform net slope correction using integer division when simplicity and accuracy conditions are met.

Command-Line Information: Optimization Pane: Signals and Parameters Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
BufferReuse
off,
on
Optimization > Signals and Parameters > Reuse block outputsReuse local (function) variables for block outputs wherever possible. Selecting this option trades code traceability for code efficiency.
EnableMemcpy
off, on
Optimization > Signals and Parameters > Use memcpy for vector assignmentOptimize code generated for vector assignment by replacing for loops with memcpy function calls.
EnhancedBackFolding
off, on
Optimization > Signals and Parameters > Minimize data copies between local and global variablesReuse existing global variables to store temporary results.
ExpressionFolding
off, on
Optimization > Signals and Parameters > Eliminate superfluous local variables (Expression folding) > InterfaceCollapse block computations into single expressions wherever possible. This improves code readability and efficiency.
InlineInvariantSignals
off, on
Optimization > Signals and Parameters > Inline invariant signalsPrecompute and inline the values of invariant signals in the generated code.
LocalBlockOutputs
off, on
Optimization > Signals and Parameters > Enable local block outputsDeclare block outputs in local (function) scope wherever possible to reduce global RAM usage.
MemcpyThreshold
int - 64
Optimization > Signals and Parameters > Memcpy threshold (bytes)Specify the minimum array size in bytes for which memcpy function calls should replace for loops in the generated code for vector assignments.
RollThreshold
int - 5
Optimization > Signals and Parameters > Loop unrolling thresholdSpecify the minimum signal width for which a for loop is to be generated.
MaxStackSize
<Specify a value>, Inherit from target
Optimization > Signals and Parameters > Maximum stack size (bytes)Specify the maximum stack size in bytes for your model.

Command-Line Information: Optimization Pane: Stateflow Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
DataBitsets (Stateflow)
off, on
Optimization > Stateflow > Use bitsets for storing Boolean dataUse bit sets for storing Boolean data.
StateBitsets (Stateflow)
off, on
Optimization > Stateflow > Use bitsets for storing state configurationUse bit sets for storing state configuration.

Command-Line Information: Code Generation Pane: General Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
CheckMdlBeforeBuild
string - off, warning, error
Code Generation > Check model before generating codeSpecify whether to run Code Generation Advisor checks before generating code.
GenCodeOnly
string - off, on
Code Generation > Generate code onlyGenerate source code, but do not execute the makefile to build an executable.
GenerateMakefile
string - off, on
Code Generation > Generate makefileSpecify whether to generate a makefile during the build process for a model.
MakeCommand
string - make_rtw
Code Generation > Make commandSpecify the make command and optional arguments to be used to generate an executable for the model.
ObjectivePriorities (GRT)
string - {''}, {'Debugging'}, {'Execution efficiency'}
Code Generation > Select objectiveSpecify the code generation objectives to use with the Code Generation Advisor.
ObjectivePriorities (ERT)
string - {''}, {'Efficiency'}, {'Traceability'}, {'Safety precaution'}, {'Debugging'}
Code Generation > Set objectivesSpecify and prioritize the code generation objectives to use with the Code Generation Advisor.
RTWCompilerOptimization
string - Off, On, Custom
Code Generation > Compiler optimization level

Use this parameter to trade off compilation time against run time for your model code without having to supply compiler-specific flags to other levels of the Simulink Coder build process.

Off - Turn compiler optimizations off for faster builds
On - Turn compiler optimizations on for faster code execution
Custom - Specify custom compiler optimization flags via the
RTWCustomCompilerOptimizations parameter
RTWCustomCompiler
Optimizations

string - '', unquoted string of compiler optimization flags
Code Generation > Custom compiler optimization flagsIf you specified Custom to the RTWCompilerOptimization parameter, use this parameter to specify custom compiler optimization flags, for example, -O2.
SaveLog
off, on
Code Generation > Save build logSave build log.
SystemTargetFile
string - grt.tlc
Code Generation > System target fileSpecify a system target file.
TargetLang
string - C, C++, C++ (Encapsulated) (ERT)
Code Generation > LanguageSpecify whether to generate C code, C++ compatible code, or C++ encapsulated code. The C++ (Encapsulated) value appears only when you select an ERT system target file for the model. Using C++ (Encapsulated) to generate code requires an Embedded Coder license.
TemplateMakefile
string - grt_default_tmf
Code Generation > Template makefileSpecify the current template makefile for building a Simulink Coder target.
TLCOptions
string - ''
Code Generation > TLC optionsSpecify additional TLC command line options.

Command-Line Information: Code Generation Pane: Report Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
GenerateReport
string - off, on
Code Generation > Report > Create code generation reportDocument the generated C or C++ code in an HTML report.
LaunchReport
string - off, on
Code Generation > Report > Launch report automaticallyDisplay the HTML report after code generation completes.

Command-Line Information: Code Generation Pane: Comments Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
ForceParamTrailComments
string - off, on
Code Generation > Comments > Verbose comments for SimulinkGlobal storage classSpecify that comments be included in the generated file. To reduce file size, the model parameters data structure is not commented when there are more than 1000 parameters.
GenerateComments
string - off, on
Code Generation > Comments > Include commentsInclude comments in generated code.
ShowEliminatedStatement
string - off, on
Code Generation > Comments > Show eliminated blocksShow statements for eliminated blocks as comments in the generated code.
SimulinkBlockComments
string - off, on
Code Generation > Comments > Simulink block / Stateflow object commentsInsert Simulink block and Stateflow object names as comments above the generated code for each block.

Command-Line Information: Code Generation Pane: Symbols Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
MaxIdLength
int - 31
Code Generation > Symbols > Maximum identifier lengthSpecify the maximum number of characters that can be used in generated function, type definition, and variable names.
ReservedNameArray
string array - {}
Code Generation > Symbols > Reserved namesEnter the names of variables or functions in the generated code that match the names of variables or functions specified in custom code to avoid name conflicts.
UseSimReservedNames
string - off, on
Code Generation > Symbols > Use the same reserved names as Simulation TargetSpecify whether to use the same reserved names as those specified in the Simulation Target > Symbols pane.

Command-Line Information: Code Generation Pane: Custom Code Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
CustomHeaderCode
string - ''
Code Generation > Custom Code > Header fileSpecify code to appear near the top of the generated model header file.
CustomInclude
string - ''
Code Generation > Custom Code > Include directoriesSpecify a space-separated list of include folders to add to the include path when compiling the generated code.

    Note   If your list includes any Windows path strings that contain spaces, each instance must be enclosed in double quotes within the argument string, for example,

    'C:\Project "C:\Custom Files"'

CustomInitializer
string - ''
Code Generation > Custom CodeSpecify code to appear in the generated model initialize function.
CustomLibrary
string - ''
Code Generation > Custom Code > Initialize function LibrariesSpecify a space-separated list of static library files to link with the generated code.
CustomSource
string - ''
Code Generation > Custom Code > Source filesSpecify a space-separated list of source files to compile and link with the generated code.
CustomSourceCode
string - ''
Code Generation > Custom Code > Source fileSpecify code to appear near the top of the generated model source file.
CustomTerminator
string - ''
Code Generation > Custom Code > Terminate functionSpecify code to appear in the generated model terminate function.
RTWUseSimCustomCode
string - off, on
Code Generation > Custom Code > Use the same custom code settings as Simulation TargetSpecify whether to use the same custom code settings as those in the Simulation Target > Custom Code pane.

Command-Line Information: Code Generation Pane: Debug Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
ProfileTLC
string - off, on
Code Generation > Debug > Profile TLCProfile the execution time of each TLC file used to generate code for this model in HTML format.
RTWVerbose
string - off, on
Code Generation > Debug > Verbose buildDisplay messages indicating code generation stages and compiler output.
RetainRTWFile
string - off, on
Code Generation > Debug > Retain .rtw fileRetain the model.rtw file in the current build folder.
TLCAssert
string - off, on
Code Generation > Debug > Enable TLC assertionProduce a TLC stack trace when the argument to the assert directives evaluates to false.
TLCCoverage
string - off, on
Code Generation > Debug > Start TLC coverage when generating codeGenerate .log files containing the number of times each line of TLC code is executed during code generation.
TLCDebug
string - off, on
Code Generation > Debug > Start TLC debugger when generating codeStart the TLC debugger during code generation at the beginning of the TLC program. TLC breakpoint statements automatically invoke the TLC debugger regardless of this setting.

Command-Line Information: Code Generation Pane: Interface Tab

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription
CodeReplacementLibrary
string - ANSI_C, C99 (ISO), GNU99 (GNU), C++ (ISO)

(For ERT-based models, additional target-specific values may be available; see the Code replacement library drop-down list in the Configuration Parameters dialog box.)
Code Generation > Interface > Code replacement librarySpecify a target-specific math library for your model. Verify that your compiler supports the library you want to use; otherwise compile-time errors can occur.
ANSI_C - ISO/IEC 9899:1990 C standard math library for floating-point functions
C99 (ISO) - ISO/IEC 9899:1999 C standard math library
GNU99 (GNU) - GNU gcc math library, which provides C99 extensions as defined by compiler option -std=gnu99
C++ (ISO) - ISO/IEC 14882:2003 C++ standard math library
ExtMode
off, on
Code Generation > Interface > InterfaceSpecify the data interface to be generated with the code.
ExtModeMexArgs
string ('')
Code Generation > Interface > Interface > External > MEX-file argumentsSpecify arguments that are passed to an external mode interface MEX-file for communicating with executing targets.
ExtModeStaticAlloc
off, on
Code Generation > Interface > Static memory allocationUse a static memory buffer for external mode instead of allocating dynamic memory (calls to malloc).
ExtModeStaticAllocSize
integer (1000000)
Code Generation > Interface > Static memory buffer sizeSpecify the size in bytes of the external mode static memory buffer.
ExtModeTransport
int - 0 for TCP/IP, 1 for Windows serial
Code Generation > Interface > Interface > External > Transport layerSpecify transport protocols for external mode communications.
GenerateASAP2
off, on
Code Generation > Interface > InterfaceSpecify the data interface to be generated with the code.
GRTInterface
string - off (except on for GRT models created before R2012a), on
Code Generation > Interface > Classic call interfaceInclude a code interface (wrapper) that is compatible with the pre-R2012a GRT target.
LogVarNameModifier
string - none, rt_, _rt
Code Generation > Interface > MAT-file variable name modifierAugment the MAT-file variable name.
MatFileLogging
string - off, on
(Default is on for GRT targets, off for ERT targets)
Code Generation > Interface > MAT-file loggingGenerate code that logs data to a MAT-file.
RTWCAPIParams
string - off, on
Code Generation > Interface > Generate C API for: parametersGenerate C API parameter tuning structures.
RTWCAPISignals
string - off, on
Code Generation > Interface > Generate C API for: signalsGenerate C API signal structure.
RTWCAPIStates
string - off, on
Code Generation > Interface > Generate C API for: statesGenerate C API state structure.
SupportNonFinite
string - off, on
Code Generation > Interface > Support non-finite numbersSupport nonfinite values (inf, nan, -inf) in the generated code.
UtilityFuncGeneration
string - Auto, Shared location
Code Generation > Interface > Shared code placementSpecify where utility code is to be generated.

Command-Line Information: Not in GUI

Parameter and ValuesConfiguration Parameters Dialog Box EquivalentDescription

CodeGenDirectory

Not availableFor MathWorks use only.
CommentNot availableFor MathWorks use only.

CompOptLevelCompliant
off, on

Not available

Set in SelectCallback for a target to indicate whether the target supports the ability to use the Compiler optimization level parameter on the Code Generation pane to control the compiler optimization level for building generated code.

Default is off for custom targets and on for targets provided with the Simulink Coder and Embedded Coder products.

ConfigAtBuildNot availableFor MathWorks use only.
ConfigurationModeNot availableFor MathWorks use only.
ConfigurationScriptNot availableFor MathWorks use only.
ERTCustomFileBannersNot availableFor MathWorks use only.
EvaledLifeSpanNot availableFor MathWorks use only.
ExtModeMexFileNot availableFor MathWorks use only.
ExtModeTestingNot availableFor MathWorks use only.
FoldNonRolledExprNot availableFor MathWorks use only.
GenerateFullHeaderNot availableFor MathWorks use only.
IncAutoGenCommentsNot availableFor MathWorks use only.
IncludeRegionsInRTWFile
BlockHierarchyMap
Not availableFor MathWorks use only.
IncludeRootSignalInRTWFileNot availableFor MathWorks use only.
IncludeVirtualBlocksInRTW
FileBlockHierarchyMap
Not availableFor MathWorks use only.
IsERTTargetNot availableFor MathWorks use only.
IsPILTargetNot availableFor MathWorks use only.
ModelReferenceCompliant
string - off, on
Not availableSet in SelectCallback for a target to indicate whether the target supports model reference.
ParamNamingFcnNot availableFor MathWorks use only.
PostCodeGenCommand
string - ''
Not availableAdd the specified post code generation command to the model build process.
PreserveNameNot availableFor MathWorks use only.
PreserveNameWithParentNot availableFor MathWorks use only.
ProcessScriptNot availableFor MathWorks use only.
ProcessScriptModeNot availableFor MathWorks use only.
SignalNamingFcnNot availableFor MathWorks use only.
SystemCodeInlineAutoNot availableFor MathWorks use only.
TargetFcnLibNot availableFor MathWorks use only.
TargetLibSuffix
string - ''
Not availableControl the suffix used for naming a target's dependent libraries (for example, _target.lib or _target.a). If specified, the string must include a period (.). (For generated model reference libraries, the library suffix defaults to _rtwlib.lib on Windows systems and _rtwlib.a on UNIX systems.)
TargetPreCompLibLocation
string - ''
Not availableControl the location of precompiled libraries. If you do not set this parameter, the code generator uses the location specified in rtwmakecfg.m.
TargetPreprocMaxBitsSint
int - 32
Not availableSpecify the maximum number of bits that the target C preprocessor can use for signed integer math.
TargetPreprocMaxBitsUint
int - 32
Not availableSpecify the maximum number of bits that the target C preprocessor can use for unsigned integer math.
TargetTypeEmulationWarn
SuppressLevel
SuppressLevel

int - 0
Not availableWhen greater than or equal to 2, suppress warning messages that the Simulink Coder software displays when emulating integer sizes in rapid prototyping environments.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS