Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

Real-Time Workshop Pane: General

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.

Real-Time Workshop: General Tab Overview

Set up general information about code generation for a model's active configuration set, including target selection, documentation, and build process parameters.

See Also

Real-Time Workshop Pane

System target file

Specify the system target file.

Settings

Default: grt.tlc

You can specify the system target file in these ways:

Tips

Command-Line Information

Parameter: SystemTargetFile
Type: string
Value: any valid system target file
Default: 'grt.tlc'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact (GRT)
ERT based (requires Real-Time Workshop Embedded Coder license)

See Also

Language

Specify C or C++ code generation.

Settings

Default: C

C

Generates .c files and places the files in your build directory.

C++

Generates C++ compatible .cpp files and places the files in your build directory.

C++ (Encapsulated)

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.

Tip

You might need to configure the Real-Time Workshop software to use the appropriate compiler before you build a system.

Command-Line Information

Parameter: TargetLang
Type: string
Value: 'C' | 'C++' | 'C++ (Encapsulated)'
Default: 'C'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Choosing and Configuring a Compiler

Controlling Generation of Function Prototypes

Controlling Generation of Encapsulated C++ Model Interfaces

Compiler optimization level

Provides flexible and generalized control over compiler optimizations for building generated code.

Settings

Default: Optimizations off (faster builds)

Optimizations off (faster builds)

Customizes compilation during the Real-Time Workshop makefile build process to minimize compilation time.

Optimizations on (faster runs)

Customizes compilation during the Real-Time Workshop makefile build process to minimize run time.

Custom

Allows you to specify custom compiler optimization flags to be applied during the Real-Time Workshop makefile build process.

Tips

Dependencies

This parameter enables Custom compiler optimization flags.

Command-Line Information

Parameter: RTWCompilerOptimization
Type: string
Value:'Off' | 'On' | 'Custom'
Default: 'Off'

Recommended Settings

ApplicationSetting
DebuggingOptimizations off (faster builds)
TraceabilityOptimizations off (faster builds)
EfficiencyOptimizations on (faster runs)
Safety precautionNo impact

See Also

Custom compiler optimization flags

Specify compiler optimization flags to be applied to building the generated code for your model.

Settings

Default: ''

Specify compiler optimization flags without quotes, for example, -O2.

Dependency

This parameter is enabled by selecting the value Custom for the parameter Compiler optimization level.

Command-Line Information

Parameter: RTWCustomCompilerOptimizations
Type: string
Value:"" | user-specified flags
Default: ""

Recommended Settings

See Compiler optimization level.

See Also

TLC options

Specify Target Language Compiler (TLC) options for code generation.

Settings

Default: ''

You can enter TLC command-line options and arguments.

Tips

Command-Line Information

Parameter: TLCOptions
Type: string
Value: any valid TLC argument
Default: ''

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Generate makefile

Specify generation of a makefile.

Settings

Default: on

On

Generates a makefile for a model during the build process.

Off

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.

Dependencies

This parameter enables:

Command-Line Information

Parameter: GenerateMakefile
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Make command

Specify a make command and optionally append make command arguments.

Settings

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.

Tip

Most targets use the default command.

Dependency

This parameter is enabled by Generate makefile.

Command-Line Information

Parameter: MakeCommand
Type: string
Value: any valid make command M-file
Default: 'make_rtw'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionmake_rtw

See Also

Template makefile

Specify a template makefile.

Settings

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:

Tips

Dependency

This parameter is enabled by Generate makefile.

Command-Line Information

Parameter: TemplateMakefile
Type: string
Value: any valid template makefile filename
Default: 'grt_default_tmf'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Ignore custom storage classes

Specify whether to apply or ignore custom storage classes.

Settings

Default: off

On

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.

Off

Applies custom storage classes as specified. You must clear this option if the model defines data objects with custom storage classes.

Tips

Dependencies

Command-Line Information

Parameter: IgnoreCustomStorageClasses
Type: string
Value: 'on' | 'off
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Custom Storage Classes

Ignore test point signals

Specify allocation of memory buffers for test points.

Settings

Default: Off

On

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.

Off

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.

Dependencies

Command-Line Information

Parameter: IgnoreTestpoints
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOff
TraceabilityNo impact
EfficiencyOn
Safety precautionNo impact

See Also

Select objective

Select code generation objectives to use with the Code Generation Advisor.

Settings

Default: Unspecified

Unspecified

No objective specified. Do not optimize code generation settings using the Code Generation Advisor.

Debugging

Specifies debugging objective. Optimize code generation settings for debugging the code generation build process using the Code Generation Advisor.

Tips

For more objectives, specify an ERT-based target.

Dependency

This parameter appears only for GRT-based targets.

Command-Line Information

Parameter: 'ObjectivePriorities'
Type: cell array of strings
Value: {''} | {'Debugging'}
Default: {''}

Recommended Settings

ApplicationSetting
DebuggingDebugging
TraceabilityNot applicable for GRT-based targets
EfficiencyNot applicable for GRT-based targets
Safety precautionNot applicable for GRT-based targets

See Also

Prioritized objectives

Lists objectives that you specify by clicking the Set objectives button.

Dependencies

Command-Line Information

Command: get_param('model', 'ObjectivePriorities')

See Also

Set objectives

Opens Configuration Set Objectives dialog box.

Dependency

This button appears only for ERT-based targets.

See Also

Configuration Set Objectives Dialog Box

Select and prioritize code generation objectives to use with the Code Generation Advisor.

Settings

  1. From the Available objectives list, select objectives.

  2. Click the select button (arrow pointing right) to move the objectives that you selected into the Selected objectives - prioritized list.

  3. 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.

Dependency

This dialog box appears only for ERT-based targets.

Command-Line Information

Parameter: 'ObjectivePriorities'
Type: cell array of strings; any combination of the available values
Value: {''} | {'Efficiency'} | {'Traceability'} | {'Safety precaution'} | {'Debugging'}
Default: {''}

See Also

Check model

Runs the Code Generation Advisor checks.

Settings

  1. 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).

  2. Click Check model. The Code Generation Advisor runs the code generation objectives checks.

Dependency

You must specify objectives before checking the model.

See Also

Check model before generating code

Choose whether to run Code Generation Advisor checks before generating code.

Settings

Default: Off

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.

On (proceed with warnings)

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.

On (stop for warnings)

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.

Command-Line Information

Parameter: CheckMdlBeforeBuild
Type: string
Value: 'Off' | 'Warning' | 'Error'
Default: 'Off'

Recommended Settings

ApplicationSetting
DebuggingOn (proceed with warnings) or On (stop for warnings)
TraceabilityOn (proceed with warnings) or On (stop for warnings)
EfficiencyOn (proceed with warnings) or On (stop for warnings)
Safety precautionOn (proceed with warnings) or On (stop for warnings)

See Also

Generate code only

Specify code generation versus an executable build.

Settings

Default: off

On

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.

Off

The caption of the Build/Generate code button becomes Build. The build process generates and compiles code, and creates an executable file.

Tip

Generate code only generates a makefile only if you select Generate makefile.

Dependency

This parameter changes the function of the Build/Generate code button.

Command-Line Information

Parameter: GenCodeOnly
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOff
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Customizing Post Code Generation Build Processing

Build/Generate code

Start the build or code generation process.

Tip

You can also start the build process by pressing Ctrl+B.

Dependency

When you select Generate code only, the caption of the Build button changes to Generate code.

Command-Line Information

Command: rtwbuild
Type: string
Value: 'modelname'

Recommended Settings

ApplicationSetting
DebuggingBuild
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Initiating the Build Process

  


Related Products & Applications

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