Main Content

Code Generation Pane: Tornado Target

The Code Generation > Tornado Target pane includes the following parameters when the Simulink® Coder™ product is installed on your system and you specify the tornado.tlc system target file.

Code Generation: Tornado Target Tab Overview

Control generated code for the Tornado® target.

Configuration

This tab appears only if you specify tornado.tlc as the System target file.

See Also

Standard math library

Specify a standard math library for your model.

Settings

Default: C99 (ISO)

C89/C90 (ANSI)

Generates calls to the ISO®/IEC 9899:1990 C standard math library.

C99 (ISO)

Generates calls to the ISO/IEC 9899:1999 C standard math library.

C++03 (ISO)

Generates calls to the ISO/IEC 14882:2003 C++ standard math library.

Tips

  • The build process checks whether the specified standard math library and toolchain are compatible. If they are not compatible, a warning occurs during code generation and the build process continues.

  • When you change the value of parameter Language, the standard math library updates to ISO/IEC 9899:1999 C (C99 (ISO)) for C and ISO/IEC 14882:2003 C++ (C++03 (ISO)) for C++.

Dependencies

The C++03 (ISO) math library is available for use only if you set parameter Language to C++.

Command-Line Information

Parameter: TargetLangStandard
Type: character vector
Value: 'C89/C90 (ANSI)' | 'C99 (ISO)' | 'C++03 (ISO)'
Default: 'C99 (ISO)'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyValid library
Safety precautionNo impact

See Also

Run-Time Environment Configuration

Code replacement library

Specify a code replacement library the code generator uses when producing code for a model.

Settings

Default: None

None

Does not use a code replacement library.

Named code replacement library

Generates calls to a specific platform, compiler, or standards code replacement library. The list of named libraries depends on:

  • Installed support packages.

  • System target file, language, standard math library, and device vendor configuration.

  • Whether you created and registered code replacement libraries, using the Embedded Coder® product.

For more information about selections for this parameter, see Code replacement library.

Tip

Before setting this parameter, verify that your compiler supports the library you want to use. If you select a parameter value that your compiler does not support, compiler errors can occur.

Command-Line Information

Parameter: CodeReplacementLibrary
Type: character vector
Value: 'None' | 'GNU C99 extensions' | 'Intel IPP for x86-64 (Windows)' | 'Intel IPP/SSE for x86-64 (Windows)' | 'Intel IPP for x86-64 (Windows for MinGW compiler)' |'Intel IPP/SSE for x86-64 (Windows for MinGW compiler)' | 'Intel IPP for x86/Pentium (Windows)' | 'Intel IPP/SSE x86/Pentium (Windows)' | 'Intel IPP for x86-64 (Linux)' | 'Intel IPP/SSE with GNU99 extensions for x86-64 (Linux)'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyValid library
Safety precautionNo impact

See Also

Run-Time Environment Configuration

Shared code placement

Specify the location for generating utility functions, exported data type definitions, and declarations of exported data with custom storage class.

Settings

Default: Auto

Auto

Operates as follows:

  • When the model contains Model blocks, places utility code within the slprj/target/_sharedutils folder.

  • When the model does not contain Model blocks, places utility code in the build folder (generally, in model.c or model.cpp).

Shared location

Directs code for utilities to be placed within the slprj folder in your working folder.

Command-Line Information

Parameter: UtilityFuncGeneration
Type: character vector
Value: 'Auto' | 'Shared location'
Default: 'Auto'

Recommended Settings

ApplicationSetting
DebuggingShared location
TraceabilityShared location
EfficiencyNo impact (execution, RAM)
Shared location (ROM)
Safety precautionNo impact

See Also

MAT-file logging

Specify whether to enable MAT-file logging.

Settings

Default: off

On

Enables MAT-file logging. When you select this option, the generated code saves to MAT-files simulation data specified in one of the following ways:

In simulation, this data would be written to the MATLAB® workspace, as described in Export Simulation Data and Configure Signal Data for Logging. Setting MAT-file logging redirects the data to a MAT-file instead. The file is named model.mat, where model is the name of your model.

Off

Disables MAT-file logging. Clearing this option has the following benefits:

  • Eliminates overhead associated with supporting a file system, which typically is not required for embedded applications

  • Eliminates extra code and memory usage required to initialize, update, and clean up logging variables

  • Under certain conditions, eliminates code and storage associated with root output ports

  • Omits the comparison between the current time and stop time in the model_step, allowing the generated program to run indefinitely, regardless of the stop time setting

Dependencies

Selecting this parameter enables parameter MAT-file variable name modifier.

Limitation

MAT-file logging does not support file-scoped data, for example, data items to which you apply the built-in custom storage class FileScope.

MAT-file logging does not work in a referenced model, and code is not generated to implement it.

Command-Line Information

Parameter: MatFileLogging
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

See Also

MAT-file variable name modifier

Select the text to add to the MAT-file variable names.

Settings

Default: rt_

rt_

Adds prefix text.

_rt

Adds suffix text.

none

Does not add text.

Dependency

If you have an Embedded Coder license, this parameter is enabled by parameter MAT-file logging.

Command-Line Information

Parameter: LogVarNameModifier
Type: character vector
Value: 'none' | 'rt_' | '_rt'
Default: 'rt_'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Code Format

Specify the code format (generated code features).

Settings

Default: RealTime

RealTime

Specifies the Real-Time code generation format.

RealTimeMalloc

Specifies the Real-Time Malloc code generation format.

Command-Line Information

Parameter: CodeFormat
Type: character vector
Value: 'RealTime' | 'RealTimeMalloc'
Default: 'RealTime'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Compare System Target File Support Across Products

StethoScope

Specify whether to enable StethoScope, an optional data acquisition and data monitoring tool.

Settings

Default: off

On

Enables StethoScope.

Off

Disables StethoScope.

Tips

You can optionally monitor and change the parameters of the executing real-time program using either StethoScope or Simulink External mode, but not both with the same compiled image.

Dependencies

Enabling parameter StethoScope disables parameter External mode, and vice versa.

Command-Line Information

Parameter: StethoScope
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

See Also

Download to VxWorks target

Specify whether to automatically download the generated program to the VxWorks® target.

Settings

Default: off

On

Automatically downloads the generated program to VxWorks after each build.

Off

Does not automatically download to VxWorks, you must downloaded generated programs manually.

Tips

  • Automatic download requires specifying the target name and host name in the makefile.

  • Before every build, reset VxWorks by pressing Ctrl+X on the host console or power-cycling the VxWorks chassis. This clears dangling processes or stale data that exists in VxWorks when the automatic download occurs.

Command-Line Information

Parameter: DownloadToVxWorks
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionOff

See Also

Base task priority

Specify the priority with which the base rate task for the model is to be spawned.

Settings

Default: 30

Tips

  • For a multirate, multitasking model, the code generator increments the priority of each subrate task by one.

  • The value you specify for this option will be overridden by a base priority specified in a call to the rt_main() function spawned as a task.

Command-Line Information

Parameter: BasePriority
Type: integer
Value: valid value
Default: 30

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyMight impact efficiency, depending on other task's priorities
Safety precautionNo impact

See Also

Task stack size

Stack size in bytes for each task that executes the model.

Settings

Default: 16384

Command-Line Information

Parameter: TaskStackSize
Type: integer
Value: valid value
Default: 16384

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyLarger stack may waste space
Safety precautionLarger stack reduces the possibility of overflow

See Also

External mode

Specify whether to enable communication between the Simulink model and an application based on a client/server architecture.

Settings

Default: on

On

Enables External mode. The client (Simulink model) transmits messages requesting the server (application) to accept parameter changes or to upload signal data. The server responds by executing the request.

Off

Disables External mode.

Dependencies

Selecting this parameter enables these parameters:

  • Transport layer

  • MEX-file arguments

  • Static memory allocation

Command-Line Information

Parameter: ExtMode
Type: character vector
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

External Mode Simulations for Parameter Tuning and Signal Monitoring

Transport layer

Specify the transport protocol for External mode communications.

Settings

Default: tcpip

tcpip

Applies a TCP/IP transport mechanism. The MEX-file name is ext_comm.

Tip

You cannot edit the value of the MEX-file name parameter displayed next to parameter Transport layer. For system target files provided by MathWorks®, the value is specified in matlabroot/toolbox/simulink/simulink/extmode_transports.m.

Dependency

This parameter is enabled by parameter External mode.

Command-Line Information

Parameter: ExtModeTransport
Type: integer
Value: 0
Default: 0

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

External Mode Simulation with TCP/IP or Serial Communication

MEX-file arguments

Specify arguments to pass to an External mode interface MEX-file for communicating with executing targets.

Settings

Default: ''

For TCP/IP interfaces, ext_comm allows three optional arguments:

  • Network name of your target (for example, 'myPuter' or '148.27.151.12')

  • Verbosity level (0 for no information or 1 for detailed information)

  • TCP/IP server port number (an integer value between 256 and 65535, with a default of 17725)

Dependency

This parameter is enabled by parameter External mode.

Command-Line Information

Parameter: ExtModeMexArgs
Type: character vector
Value: valid arguments
Default: ''

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Static memory allocation

Control the memory buffer for External mode communication.

Settings

Default: off

On

Enables parameter Static memory buffer size for allocating dynamic memory.

Off

Uses a static memory buffer for External mode instead of allocating dynamic memory (calls to malloc).

Tip

To determine how much memory you need to allocate, select verbose mode on the target to display the amount of memory it tries to allocate and the amount of memory available.

Dependencies

  • This parameter is enabled by parameter External mode.

  • This parameter enables parameter Static memory buffer size.

Command-Line Information

Parameter: ExtModeStaticAlloc
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Control Memory Allocation for Communication Buffers in Target

Static memory buffer size

Specify the memory buffer size for External mode communication.

Settings

Default: 1000000

Enter the number of bytes to preallocate for External mode communications buffers in the target.

Tips

  • If you enter too small a value for your application, External mode issues an out-of-memory error.

  • To determine how much memory you need to allocate, select verbose mode on the target to display the amount of memory it tries to allocate and the amount of memory available.

Dependency

This parameter is enabled by parameter Static memory allocation.

Command-Line Information

Parameter: ExtModeStaticAllocSize
Type: integer
Value: valid value
Default: 1000000

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Control Memory Allocation for Communication Buffers in Target