| Contents | Index |
| On this page… |
|---|
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
Mapping Application Requirements to the Data Import/Export Pane
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | No impact (GRT) Off (ERT) | Off | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | Off | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | On | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | Off | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | On | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | Off | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | On | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | Off | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | On | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | 1 | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | Array | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | Refine output | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | 1 | |
No impact | No impact | No impact | No impact (GRT) Off (ERT) | '[]' | |
Mapping Application Requirements to the Optimization Pane: General Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
Off (GRT) No impact (ERT) | Off | On | Off | On | |
No impact | No impact | On | On | On | |
No impact | On | On (execution) No impact (ROM, RAM) | Off | On | |
No impact | No impact | Finite value | inf | inf | |
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 | 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 Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
Off (GRT) On (ERT) | On | On | No impact | Off | |
Off | Off | On | No impact | On | |
Off | No impact | On | No impact | On | |
Off | No impact (GRT) Off (ERT) | On | No impact | On | |
Off | Off | No impact (execution) On (ROM, RAM) | No impact | Off | |
No impact | No impact | >0 | >1 | 5 | |
No impact | No impact | No impact | No impact | Inherit from target | |
No impact | No impact | On | No impact | On | |
No impact | No impact | Accept default or determine target-specific optimal value | No impact | 64 | |
Off | Off | On | No impact | On | |
Off | Off | On | No impact | Off | |
Mapping Application Requirements to the Optimization Pane: Stateflow Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
Off | Off | Off (execution, ROM) On (RAM) | No impact | Off | |
Off | Off | Off (execution, ROM) On (RAM) | No impact | Off | |
Mapping Application Requirements to the Diagnostics Pane: Solver Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
error | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | warning or error | error | |
No impact | No impact | No impact | error | warning | |
warning | No impact | none | No impact | warning | |
No impact | No impact | No impact | error | warning | |
Mapping Application Requirements to the Diagnostics Pane: Sample Time Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | error | |
No impact | No impact | No impact | none or error | none | |
No impact | No impact | No impact | error | error | |
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 Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | Explicit only | Explicit only | |
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | error | none | |
warning or error | warning or error | none | error | none | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | error | error | |
No impact | No impact | No impact | error | error | |
No impact | No impact | No impact | error | error | |
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | error | error | |
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | error | Enable all as warnings | |
No impact | No impact | No impact | error | Enable all as warning | |
No impact | No impact | No impact | error | Enable all as errors | |
No impact | No impact | No impact | error | warning | |
warning | No impact | none | No impact | none | |
No impact | No impact | No impact | On | On | |
No impact | No impact | No impact | On | Off | |
No impact | No impact | No impact | On | Off | |
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 Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | warning | none | |
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | warning | warning | |
Mapping Application Requirements to the Diagnostics Pane: Connectivity Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | warning | |
No impact | No impact | No impact | error | error | |
No impact | No impact | No impact | Enable all | Use local settings | |
Mapping Application Requirements to the Diagnostics Pane: Compatibility Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | error | none | |
Mapping Application Requirements to the Diagnostics Pane: Model Referencing Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | none | none | |
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | warning | none | |
No impact | No impact | No impact | error | none | |
No impact | No impact | No impact | error | warning | |
Mapping Application Requirements to the Diagnostics Pane: Saving Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | No impact | warning | |
No impact | No impact | No impact | No impact | none | |
Mapping Application Requirements to the Diagnostics Pane: Stateflow Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
warning | No impact | No impact (for simulation and during development) none (for production code generation) | warning | warning | |
warning | No impact | No impact | error | warning | |
warning | No impact | No impact | error | warning | |
warning | No impact | No impact (for simulation and during development) none (for production code generation) | error | warning | |
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 Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
| No impact | No impact | No impact | No impact | Generic | |
No impact | No impact | No impact | No impact | Unspecified (assume 32–bit Generic) | |
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 | |
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 | |
No impact | No impact | No impact | No impact | Unspecified | |
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 | |
No impact | No impact | On | No impact | On | |
No impact | No impact | No impact | No impact | On | |
Mapping Application Requirements to the Model Referencing Pane
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
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 | |
No impact | No impact | No impact | error if rebuild required | error if rebuild required | |
No impact | No impact | No impact | No impact | Off | |
No impact | No impact | No impact | No impact | None | |
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 |
No impact | No impact | No impact | Off | Off | |
No impact | No impact | No impact | Off | Infer from blocks in model | |
No impact | No impact | No impact | No impact | '' | |
Mapping Application Requirements to the Simulation Target Pane: General Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
On | No impact | Off | On | On | |
On | No impact | Off | On | On | |
On | On | Off | On | On | |
On | No impact | Off | No impact | On | |
No impact | No impact | On | No impact | On | |
On | On | Off | On | On | |
No impact | No impact | No impact | No impact | Incremental build | |
Mapping Application Requirements to the Simulation Target Pane: Symbols Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | No impact | {} | |
Mapping Application Requirements to the Simulation Target Pane: Custom Code Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
On | No impact | No impact | On | On | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
Mapping Application Requirements to the Code Generation Pane: General Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | No impact (GRT) ERT based (ERT) | grt.tlc | |
No impact | No impact | No impact | No impact | C | |
Optimizations off (faster builds) | Optimizations off (faster builds) | Optimizations on (faster runs) (execution) No impact (ROM, RAM) | No impact | Optimizations off (faster builds) | |
Optimizations off (faster builds) | Optimizations off (faster builds) | Optimizations on (faster runs) | No impact | Optimizations off (faster builds) | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | On | |
No impact | No impact | No impact | make_rtw | make_rtw | |
No impact | No impact | No impact | No impact | grt_default_tmf | |
| Debugging | Not applicable for GRT-based targets | Execution efficiency | Not applicable for GRT-based targets | Unspecified | |
| Check model before generating code | 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) | On (proceed with warnings) or On (stop for warnings) | Off |
Off | No impact | No impact | No impact | Off | |
Mapping Application Requirements to the Code Generation Pane: Report Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precautions | ||
On | On | No impact | On | Off | |
On | On | No impact | No impact | Off | |
Mapping Application Requirements to the Code Generation Pane: Comments Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
On | On | No impact | On | On | |
On | On | No impact | On | On | |
On | On | No impact | On | Off | |
On | On | No impact | On | Off | |
Mapping Application Requirements to the Code Generation Pane: Symbols Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
Any valid value | >30 | No impact | >30 | 31 | |
No impact | No impact | No impact | No impact | Off | |
No impact | No impact | No impact | No impact | {} | |
Mapping Application Requirements to the Code Generation Pane: Custom Code Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | No impact | No impact | Off | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | '' | |
Mapping Application Requirements to the Code Generation Pane: Debug Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
On | No impact | No impact | On | On | |
On | No impact | No impact | No impact | Off | |
On | No impact | No impact | No impact | Off | |
On | No impact | No impact | No impact | Off | |
On | No impact | No impact | No impact | Off | |
On | No impact | No impact | On | Off | |
Mapping Application Requirements to the Code Generation Pane: Interface Tab
| Configuration Parameter | Settings for Building Code | Factory Default | |||
|---|---|---|---|---|---|
| Debugging | Traceability | Efficiency | Safety Precaution | ||
No impact | No impact | Any valid value | No impact | C89/C90 (ANSI) | |
Shared location (GRT) No impact (ERT) | Shared location (GRT) No impact (ERT) | No impact (execution, RAM) Shared location (ROM) | No impact | Auto | |
No impact | No impact | Off (Execution, ROM) No impact (RAM) | Off | On | |
No impact | Off | Off (execution, ROM), No impact (RAM) | Off | Off (except On for GRT models created before R2012a) | |
On | No impact | Off | Off | On (GRT) Off (ERT) | |
No impact | No impact | No impact | No impact | rt_ | |
No impact | No impact | No impact | No impact (GRT) None (ERT) | None | |
No impact | No impact | No impact | No impact | On | |
No impact | No impact | No impact | No impact | On | |
No impact | No impact | No impact | No impact | Off | |
No impact | No impact | No impact | No impact | tcpip | |
No impact | No impact | No impact | No impact | '' | |
No impact | No impact | No impact | No impact | Off | |
No impact | No impact | No impact | No impact | 1000000 | |
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.
Note Parameters that are specific to Stateflow or Simulink Fixed Point™ products are marked with (Stateflow) and (Simulink Fixed Point), respectively. The default setting for a parameter might vary for different targets. |
Command-Line Information: Optimization Pane: General Tab
| Parameter and Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
| 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 values | Remove 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 zero | Remove 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.0 | Optimize 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 exceptions | Suppress 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 corrections | Use 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 integers | Perform net slope correction using integer division when simplicity and accuracy conditions are met. |
Command-Line Information: Optimization Pane: Signals and Parameters Tab
| Parameter and Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
| BufferReuse off, on | Optimization > Signals and Parameters > Reuse block outputs | Reuse 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 assignment | Optimize 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 variables | Reuse existing global variables to store temporary results. |
| ExpressionFolding off, on | Optimization > Signals and Parameters > Eliminate superfluous local variables (Expression folding) > Interface | Collapse block computations into single expressions wherever possible. This improves code readability and efficiency. |
| InlineInvariantSignals off, on | Optimization > Signals and Parameters > Inline invariant signals | Precompute and inline the values of invariant signals in the generated code. |
| LocalBlockOutputs off, on | Optimization > Signals and Parameters > Enable local block outputs | Declare 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 threshold | Specify 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 Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
| DataBitsets (Stateflow) off, on | Optimization > Stateflow > Use bitsets for storing Boolean data | Use bit sets for storing Boolean data. |
| StateBitsets (Stateflow) off, on | Optimization > Stateflow > Use bitsets for storing state configuration | Use bit sets for storing state configuration. |
Command-Line Information: Code Generation Pane: General Tab
| Parameter and Values | Configuration Parameters Dialog Box Equivalent | Description | |||
|---|---|---|---|---|---|
| CheckMdlBeforeBuild string - off, warning, error | Code Generation > Check model before generating code | Specify whether to run Code Generation Advisor checks before generating code. | |||
| GenCodeOnly string - off, on | Code Generation > Generate code only | Generate source code, but do not execute the makefile to build an executable. | |||
| GenerateMakefile string - off, on | Code Generation > Generate makefile | Specify whether to generate a makefile during the build process for a model. | |||
| MakeCommand string - make_rtw | Code Generation > Make command | Specify 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 objective | Specify the code generation objectives to use with the Code Generation Advisor. | |||
| ObjectivePriorities (ERT) string - {''}, {'Efficiency'}, {'Traceability'}, {'Safety precaution'}, {'Debugging'} | Code Generation > Set objectives | Specify 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.
| |||
| RTWCustomCompiler Optimizations string - '', unquoted string of compiler optimization flags | Code Generation > Custom compiler optimization flags | If 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 log | Save build log. | |||
| SystemTargetFile string - grt.tlc | Code Generation > System target file | Specify a system target file. | |||
| TargetLang string - C, C++, C++ (Encapsulated) (ERT) | Code Generation > Language | Specify 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 makefile | Specify the current template makefile for building a Simulink Coder target. | |||
| TLCOptions string - '' | Code Generation > TLC options | Specify additional TLC command line options. |
Command-Line Information: Code Generation Pane: Report Tab
| Parameter and Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
| GenerateReport string - off, on | Code Generation > Report > Create code generation report | Document the generated C or C++ code in an HTML report. |
| LaunchReport string - off, on | Code Generation > Report > Launch report automatically | Display the HTML report after code generation completes. |
Command-Line Information: Code Generation Pane: Comments Tab
| Parameter and Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
| ForceParamTrailComments string - off, on | Code Generation > Comments > Verbose comments for SimulinkGlobal storage class | Specify 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 comments | Include comments in generated code. |
| ShowEliminatedStatement string - off, on | Code Generation > Comments > Show eliminated blocks | Show statements for eliminated blocks as comments in the generated code. |
| SimulinkBlockComments string - off, on | Code Generation > Comments > Simulink block / Stateflow object comments | Insert 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 Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
| MaxIdLength int - 31 | Code Generation > Symbols > Maximum identifier length | Specify the maximum number of characters that can be used in generated function, type definition, and variable names. |
| ReservedNameArray string array - {} | Code Generation > Symbols > Reserved names | Enter 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 Target | Specify 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 Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
| CustomHeaderCode string - '' | Code Generation > Custom Code > Header file | Specify code to appear near the top of the generated model header file. |
| CustomInclude string - '' | Code Generation > Custom Code > Include directories | Specify a space-separated list of include folders to add to the include path when compiling the generated code. |
| CustomInitializer string - '' | Code Generation > Custom Code | Specify code to appear in the generated model initialize function. |
| CustomLibrary string - '' | Code Generation > Custom Code > Initialize function Libraries | Specify a space-separated list of static library files to link with the generated code. |
| CustomSource string - '' | Code Generation > Custom Code > Source files | Specify a space-separated list of source files to compile and link with the generated code. |
| CustomSourceCode string - '' | Code Generation > Custom Code > Source file | Specify code to appear near the top of the generated model source file. |
| CustomTerminator string - '' | Code Generation > Custom Code > Terminate function | Specify 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 Target | Specify 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 Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
| ProfileTLC string - off, on | Code Generation > Debug > Profile TLC | Profile 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 build | Display messages indicating code generation stages and compiler output. |
| RetainRTWFile string - off, on | Code Generation > Debug > Retain .rtw file | Retain the model.rtw file in the current build folder. |
| TLCAssert string - off, on | Code Generation > Debug > Enable TLC assertion | Produce 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 code | Generate .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 code | Start 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 Values | Configuration Parameters Dialog Box Equivalent | Description | ||||
|---|---|---|---|---|---|---|
| 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 library | Specify 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.
| ||||
| ExtMode off, on | Code Generation > Interface > Interface | Specify the data interface to be generated with the code. | ||||
| ExtModeMexArgs string ('') | Code Generation > Interface > Interface > External > MEX-file arguments | Specify arguments that are passed to an external mode interface MEX-file for communicating with executing targets. | ||||
| ExtModeStaticAlloc off, on | Code Generation > Interface > Static memory allocation | Use a static memory buffer for external mode instead of allocating dynamic memory (calls to malloc). | ||||
| ExtModeStaticAllocSize integer (1000000) | Code Generation > Interface > Static memory buffer size | Specify 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 layer | Specify transport protocols for external mode communications. | ||||
| GenerateASAP2 off, on | Code Generation > Interface > Interface | Specify 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 interface | Include 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 modifier | Augment the MAT-file variable name. | ||||
| MatFileLogging string - off, on (Default is on for GRT targets, off for ERT targets) | Code Generation > Interface > MAT-file logging | Generate code that logs data to a MAT-file. | ||||
| RTWCAPIParams string - off, on | Code Generation > Interface > Generate C API for: parameters | Generate C API parameter tuning structures. | ||||
| RTWCAPISignals string - off, on | Code Generation > Interface > Generate C API for: signals | Generate C API signal structure. | ||||
| RTWCAPIStates string - off, on | Code Generation > Interface > Generate C API for: states | Generate C API state structure. | ||||
| SupportNonFinite string - off, on | Code Generation > Interface > Support non-finite numbers | Support nonfinite values (inf, nan, -inf) in the generated code. | ||||
| UtilityFuncGeneration string - Auto, Shared location | Code Generation > Interface > Shared code placement | Specify where utility code is to be generated. |
Command-Line Information: Not in GUI
| Parameter and Values | Configuration Parameters Dialog Box Equivalent | Description |
|---|---|---|
CodeGenDirectory | Not available | For MathWorks use only. |
| Comment | Not available | For MathWorks use only. |
CompOptLevelCompliant | 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. |
| ConfigAtBuild | Not available | For MathWorks use only. |
| ConfigurationMode | Not available | For MathWorks use only. |
| ConfigurationScript | Not available | For MathWorks use only. |
| ERTCustomFileBanners | Not available | For MathWorks use only. |
| EvaledLifeSpan | Not available | For MathWorks use only. |
| ExtModeMexFile | Not available | For MathWorks use only. |
| ExtModeTesting | Not available | For MathWorks use only. |
| FoldNonRolledExpr | Not available | For MathWorks use only. |
| GenerateFullHeader | Not available | For MathWorks use only. |
| IncAutoGenComments | Not available | For MathWorks use only. |
| IncludeRegionsInRTWFile BlockHierarchyMap | Not available | For MathWorks use only. |
| IncludeRootSignalInRTWFile | Not available | For MathWorks use only. |
| IncludeVirtualBlocksInRTW FileBlockHierarchyMap | Not available | For MathWorks use only. |
| IsERTTarget | Not available | For MathWorks use only. |
| IsPILTarget | Not available | For MathWorks use only. |
| ModelReferenceCompliant string - off, on | Not available | Set in SelectCallback for a target to indicate whether the target supports model reference. |
| ParamNamingFcn | Not available | For MathWorks use only. |
| PostCodeGenCommand string - '' | Not available | Add the specified post code generation command to the model build process. |
| PreserveName | Not available | For MathWorks use only. |
| PreserveNameWithParent | Not available | For MathWorks use only. |
| ProcessScript | Not available | For MathWorks use only. |
| ProcessScriptMode | Not available | For MathWorks use only. |
| SignalNamingFcn | Not available | For MathWorks use only. |
| SystemCodeInlineAuto | Not available | For MathWorks use only. |
| TargetFcnLib | Not available | For MathWorks use only. |
| TargetLibSuffix string - '' | Not available | Control 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 available | Control 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 available | Specify the maximum number of bits that the target C preprocessor can use for signed integer math. |
| TargetPreprocMaxBitsUint int - 32 | Not available | Specify the maximum number of bits that the target C preprocessor can use for unsigned integer math. |
| TargetTypeEmulationWarn SuppressLevel SuppressLevel int - 0 | Not available | When greater than or equal to 2, suppress warning messages that the Simulink Coder software displays when emulating integer sizes in rapid prototyping environments. |
![]() | Code Generation Pane: IDE Link | Model Advisor Checks | ![]() |

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 |