Skip to Main Content Skip to Search
Product Documentation

Code Generation Pane: Real-Time Windows Target

Real-Time Windows Target Tab Overview

Control the code created by Simulink® Coder™ code generation software for a Real-Time Windows Target application.

Configuration

To enable the xPC Target™ options pane, select rtwin.tlc for the System target file parameter on the code generation pane.

See Also

Target function library

Specify a floating-point math library extension.

Settings

Default: C89/C90 (ANSI)

C89/C90 (ANSI)

Generates calls to the ISO/IEC 9899:1990 C standard math library for floating-point functions.

C99 (ISO)

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

GNU99 (GNU)

Generates calls to the GNU gcc math library, which provides C99 extensions as defined by compiler option -std=gnu99.

C++ (ISO)

Generates calls to the ISO/IEC 14882:2003 C++ standard math library. This setting is visible only if you selected C++ for the Language parameter on the Code Generation pane of the Configuration Parameters dialog box.

Tips

Command-Line Information

Parameter: TargetFunctionLibrary
Type: string
Value: 'ANSI_C' | 'C99 (ISO)' | 'GNU99 (GNU)' | 'C++ (ISO)'
Default: 'ANSI_C'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
Safety precautionNo impact

Shared code placement

Specify the location for generating shared utility code

Settings

Default: Auto

Auto

Operates as follows:

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

  • When the model does not contain Model blocks, place 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: string
Value: 'Auto' | 'Shared location'
Default: 'Auto'

Recommended Settings

ApplicationSetting
DebuggingShared location
TraceabilityShared location
EfficiencyShared location
Safety precautionNo impact

Compiler optimizations

Instruct the C compiler to generate real-time code fully optimized for speed.

Settings

Default: on

On

Optimizes the code for speed.

Off

Performs no optimizations.

Command-Line Information

Parameter: CCOptimize
Type: Boolean
Value: on | off
Default: on

Recommended Settings

ApplicationSetting
DebuggingOff
TraceabilityOff
EfficiencyOn
Safety precautionOn

Generate assembly listings

Instruct the C compiler to generate assembly listings for the generated code.

Settings

Default: off

On

Generates assembly listings.

Off

Suppresses assembly listings.

Command-Line Information

Parameter: CCListing
Type: Boolean
Value: on | off
Default: off

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Rebuild all

Force all the object files to always be rebuilt regardless of their time stamps.

Settings

Default: off

On

Rebuilds all object files at every build.

Off

Rebuilds only object files whose time stamps show they are outdated.

Command-Line Information

Parameter: RebuildAll
Type: Boolean
Value: on | off
Default: off

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityNo impact
EfficiencyNo run-time impact. (Build may take longer.)
Safety precautionOn

External mode

Enable client/server communication between Simulink software and an application.

Settings

Default: on

On

Enables external mode.

Off

Disables external mode.

Tip

This check box is selected by default and grayed out.

Dependencies

Selecting External mode enables:

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Creating a TCP/IP Transport Layer for External Communication

Transport layer

Specify the transport protocol for external mode communication.

Settings

Default: sharedmem

sharedmem

Uses a shared memory transport mechanism. The MEX-file name is rtwinext.

Tips

Dependency

This parameter is enabled by checking 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

MEX-file arguments

Specify external mode MEX arguments.

Settings

Default: ''

For a shared memory transport, rtwinext allows two optional arguments. The arguments are positional, so the first argument must appear if the second appears.

The default is Nonverbose mode (0). To specify Verbose mode, set MEX-file arguments to:

'' 1

where '' is the empty string and 1 specifies Verbose mode.

Dependency

This parameter is enabled by checking External Mode.

Command-Line Information

Parameter: ExtModeMexArgs
Type: string followed by integer
Value: '' | '' 0 | '' 1
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 the Static memory buffer size parameter to allocate 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, enable verbose mode on the target to display the amount of memory it tries to allocate and is available.

Dependencies

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

External Mode Interface Options

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

Dependency

This parameter is enabled by Static memory allocation.

Command-Line Information

Parameter: ExtModeStaticAllocSize
Type: integer
Value: Any valid size
Default: 1000000

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

External Mode Interface Options

  


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