| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
When the Real-Time Workshop product is installed on your system and you select a GRT-based target, the Real-Time Workshop General pane includes the following parameters.

When the Real-Time Workshop product is installed on your system and you select an ERT-based target, the Real-Time Workshop General pane includes the following parameters. ERT-based target parameters require a Real-Time Workshop Embedded Coder license when generating code.

| On this page… |
|---|
Real-Time Workshop: General Tab Overview Custom compiler optimization flags Configuration Set Objectives Dialog Box |
Set up general information about code generation for a model's active configuration set, including target selection, documentation, and build process parameters.
Specify the system target file.
Default: grt.tlc
You can specify the system target file in these ways:
Use the System Target File Browser. Click the Browse button, which lets you select a preset target configuration consisting of a system target file, template makefile, and make command.
Enter the name of your system target file in this field.
The System Target File Browser lists all system target files found on the MATLAB path. Some system target files require additional licensed products, such as the Real-Time Workshop Embedded Coder product.
To configure your model for rapid simulation, select rsim.tlc.
To configure your model for xPC Target™, select xpctarget.tlc or xpctargetert.tlc.
| Parameter: SystemTargetFile |
| Type: string |
| Value: any valid system target file |
| Default: 'grt.tlc' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact (GRT) ERT based (requires Real-Time Workshop Embedded Coder license) |
Specify C or C++ code generation.
Default: C
Generates .c files and places the files in your build directory.
Generates C++ compatible .cpp files and places the files in your build directory.
Generates C++ encapsulated .cpp files and places the files in your build directory. Selecting this value causes the build to generate a C++ class interface to model code. The generated interface encapsulates all required model data into C++ class attributes and all model entry point functions into C++ class methods.
Note Using C++ (Encapsulated) for code generation requires a Real-Time Workshop Embedded Coder license and the ERT target. The value C++ (Encapsulated) appears in the Language menu if you select an ERT target for your model, but you cannot use the ERT target and the C++ (Encapsulated) value for model building without a Real-Time Workshop Embedded Coder license. |
You might need to configure the Real-Time Workshop software to use the appropriate compiler before you build a system.
| Parameter: TargetLang |
| Type: string |
| Value: 'C' | 'C++' | 'C++ (Encapsulated)' |
| Default: 'C' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Choosing and Configuring a Compiler
Provides flexible and generalized control over compiler optimizations for building generated code.
Default: Optimizations off (faster builds)
Customizes compilation during the Real-Time Workshop makefile build process to minimize compilation time.
Customizes compilation during the Real-Time Workshop makefile build process to minimize run time.
Allows you to specify custom compiler optimization flags to be applied during the Real-Time Workshop makefile build process.
Target-independent values Optimizations on (faster runs) and Optimizations off (faster builds) allow you to easily toggle compiler optimizations on and off during code development.
Custom allows you to enter custom compiler optimization flags at Simulink GUI level, rather than editing compiler flags into template makefiles (TMFs) or supplying compiler flags to Real-Time Workshop make commands.
If you specify compiler options for your Real-Time Workshop makefile build using OPT_OPTS, MEX_OPTS (except MEX_OPTS="-v"), or MEX_OPT_FILE, the value of Compiler optimization level is ignored and a warning is issued about the ignored parameter.
This parameter enables Custom compiler optimization flags.
| Parameter: RTWCompilerOptimization |
| Type: string |
| Value:'Off' | 'On' | 'Custom' |
| Default: 'Off' |
| Application | Setting |
|---|---|
| Debugging | Optimizations off (faster builds) |
| Traceability | Optimizations off (faster builds) |
| Efficiency | Optimizations on (faster runs) |
| Safety precaution | No impact |
Specify compiler optimization flags to be applied to building the generated code for your model.
Default: ''
Specify compiler optimization flags without quotes, for example, -O2.
This parameter is enabled by selecting the value Custom for the parameter Compiler optimization level.
| Parameter: RTWCustomCompilerOptimizations |
| Type: string |
| Value:"" | user-specified flags |
| Default: "" |
See Compiler optimization level.
Specify Target Language Compiler (TLC) options for code generation.
Default: ''
You can enter TLC command-line options and arguments.
Specifying TLC options does not add flags to the Make command field.
The summary section of the generated HTML report lists the TLC options that you specify for the build in which you generate the report.
| Parameter: TLCOptions |
| Type: string |
| Value: any valid TLC argument |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Specify generation of a makefile.
Default: on
Generates a makefile for a model during the build process.
Suppresses the generation of a makefile. You must set up any post code generation build processing, including compilation and linking, as a user-defined command.
This parameter enables:
Make command
Template makefile
| Parameter: GenerateMakefile |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'on' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Specify a make command and optionally append make command arguments.
Default: make_rtw
The make command, a high-level M-file command, invoked when you start a build, controls the Real-Time Workshop build process.
Each target has an associated make command, automatically supplied when you select a target file using the System Target File Browser.
Some third-party targets supply a make command. See the vendor's documentation.
You can specify arguments in the Make command field which pass into the makefile-based build process. Append the arguments after the make command, as in the following example:
make_rtw OPTS="-DMYDEFINE=1"
The syntax for make command options differs slightly for different compilers.
Most targets use the default command.
This parameter is enabled by Generate makefile.
| Parameter: MakeCommand |
| Type: string |
| Value: any valid make command M-file |
| Default: 'make_rtw' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | make_rtw |
Specify a template makefile.
Default: grt_default_tmf
The template makefile determines which compiler runs, during the make phase of the build, to compile the generated code. You can specify template makefiles in the following ways:
Generate a value by selecting a target configuration using the System Target File Browser.
Explicitly enter a custom template makefile filename (including the extension). The file must be on the MATLAB path.
If you do not include a filename extension for a custom template makefile, the code generator attempts to find and execute an M-file.
You can customize your build process by modifying an existing template makefile or by providing your own template makefile.
This parameter is enabled by Generate makefile.
| Parameter: TemplateMakefile |
| Type: string |
| Value: any valid template makefile filename |
| Default: 'grt_default_tmf' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Specify whether to apply or ignore custom storage classes.
Default: off
Ignores custom storage classes by treating data objects that have them as if their storage class attribute is set to Auto. Data objects with an Auto storage class do not interface with external code and are stored as local or shared variables or in a global data structure.
Applies custom storage classes as specified. You must clear this option if the model defines data objects with custom storage classes.
Clear this parameter before configuring data objects with custom storage classes.
Setting for top-level and referenced models must match.
This parameter only appears for ERT-based targets.
Clear this parameter to enable module packaging features.
This parameter requires a Real-Time Workshop Embedded Coder license when generating code.
| Parameter: IgnoreCustomStorageClasses |
| Type: string |
| Value: 'on' | 'off |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Specify allocation of memory buffers for test points.
Default: Off
Ignores all test points during code generation, allowing optimal buffer allocation for signals with test points, facilitating transition from prototyping to deployment and avoiding accidental degradation of generated code due to workflow artifacts.
Allocates separate memory buffers for test points, resulting in a loss of code generation optimizations such as reducing memory usage by storing signals in reusable buffers.
This parameter appears only for ERT-based targets.
This parameter requires a Real-Time Workshop Embedded Coder license when generating code.
| Parameter: IgnoreTestpoints |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | Off |
| Traceability | No impact |
| Efficiency | On |
| Safety precaution | No impact |
Signals with Test Points in the Real-Time Workshop User's Guide
Working with Test Points in the Simulink User's Guide
Signal Considerations in the Real-Time Workshop User's Guide
Select code generation objectives to use with the Code Generation Advisor.
Default: Unspecified
No objective specified. Do not optimize code generation settings using the Code Generation Advisor.
Specifies debugging objective. Optimize code generation settings for debugging the code generation build process using the Code Generation Advisor.
For more objectives, specify an ERT-based target.
This parameter appears only for GRT-based targets.
| Parameter: 'ObjectivePriorities' |
| Type: cell array of strings |
| Value: {''} | {'Debugging'} |
| Default: {''} |
| Application | Setting |
|---|---|
| Debugging | Debugging |
| Traceability | Not applicable for GRT-based targets |
| Efficiency | Not applicable for GRT-based targets |
| Safety precaution | Not applicable for GRT-based targets |
Mapping Application Objectives to Model Configuration Parameters in the Real-Time Workshop Embedded Coder documentation.
Configuring Code Generation Objectives in the Real-Time Workshop User's Guide.
Lists objectives that you specify by clicking the Set objectives button.
This parameter appears only for ERT-based targets.
This parameter requires a Real-Time Workshop Embedded Coder license when generating code.
| Command: get_param('model', 'ObjectivePriorities') |
Mapping Application Objectives to Model Configuration Parameters in the Real-Time Workshop Embedded Coder documentation.
Configuring Code Generation Objectives in the Real-Time Workshop User's Guide.
Opens Configuration Set Objectives dialog box.
This button appears only for ERT-based targets.
Mapping Application Objectives to Model Configuration Parameters in the Real-Time Workshop Embedded Coder documentation.
Configuring Code Generation Objectives in the Real-Time Workshop User's Guide.
Select and prioritize code generation objectives to use with the Code Generation Advisor.

From the Available objectives list, select objectives.
Click the select button (arrow pointing right) to move the objectives that you selected into the Selected objectives - prioritized list.
Click the higher priority (up arrow) and lower priority (down arrow) buttons to prioritize the objectives.
Objectives. List of available objectives.
| Efficiency — Configure code generation settings to reduce RAM, ROM, and execution time. |
| Traceability — Configure code generation settings to provide mapping between model elements and code. |
| Safety precaution — Configure code generation settings to increase clarity, determinism, robustness, and verifiability of the code. |
| Debugging — Configure code generation settings to debug the code generation build process. |
Priorities. After you select objectives from the Available objectives parameter, organize the objectives in the Selected objectives - prioritized parameter with the highest priority objective at the top.
This dialog box appears only for ERT-based targets.
| Parameter: 'ObjectivePriorities' |
| Type: cell array of strings; any combination of the available values |
| Value: {''} | {'Efficiency'} | {'Traceability'} | {'Safety precaution'} | {'Debugging'} |
| Default: {''} |
Mapping Application Objectives to Model Configuration Parameters in the Real-Time Workshop Embedded Coder documentation.
Configuring Code Generation Objectives in the Real-Time Workshop User's Guide.
Runs the Code Generation Advisor checks.
Specify code generation objectives using the Select objective parameter (available with GRT-based targets) or in the Configuration Set Objectives dialog box, by clicking Set objectives (available with ERT-based targets).
Click Check model. The Code Generation Advisor runs the code generation objectives checks.
You must specify objectives before checking the model.
Mapping Application Objectives to Model Configuration Parameters in the Real-Time Workshop Embedded Coder documentation.
Configuring Code Generation Objectives in the Real-Time Workshop User's Guide.
Choose whether to run Code Generation Advisor checks before generating code.
Default: Off
Generates code without checking whether the model meets code generation objectives. The code generation report summary and file headers indicate the specified objectives and that the validation was not run.
Checks whether the model meets code generation objectives using the Code Generation Objectives checks in the Code Generation Advisor. If the Code Generation Advisor reports a warning, the Real-Time Workshop software continues generating code. The code generation report summary and file headers indicate the specified objectives and the validation result.
Checks whether the model meets code generation objectives using the Code Generation Objectives checks in the Code Generation Advisor. If the Code Generation Advisor reports a warning, the Real-Time Workshop software does not continue generating code.
| Parameter: CheckMdlBeforeBuild |
| Type: string |
| Value: 'Off' | 'Warning' | 'Error' |
| Default: 'Off' |
| Application | Setting |
|---|---|
| Debugging | On (proceed with warnings) or On (stop for warnings) |
| Traceability | On (proceed with warnings) or On (stop for warnings) |
| Efficiency | On (proceed with warnings) or On (stop for warnings) |
| Safety precaution | On (proceed with warnings) or On (stop for warnings) |
Mapping Application Objectives to Model Configuration Parameters in the Real-Time Workshop Embedded Coder documentation.
Configuring Code Generation Objectives in the Real-Time Workshop User's Guide.
Specify code generation versus an executable build.
Default: off
The caption of the Build/Generate code button becomes Generate code. The build process generates code and a makefile, but it does not invoke the make command.
The caption of the Build/Generate code button becomes Build. The build process generates and compiles code, and creates an executable file.
Generate code only generates a makefile only if you select Generate makefile.
This parameter changes the function of the Build/Generate code button.
| Parameter: GenCodeOnly |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | Off |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Customizing Post Code Generation Build Processing
Start the build or code generation process.
You can also start the build process by pressing Ctrl+B.
When you select Generate code only, the caption of the Build button changes to Generate code.
| Command: rtwbuild |
| Type: string |
| Value: 'modelname' |
| Application | Setting |
|---|---|
| Debugging | Build |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
![]() | Configuration Parameters for Simulink Models | Real-Time Workshop Pane: Report | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |