Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

Configuring the Build Process

Controlling Compiler Optimization Level and Specifying Custom Optimization Settings

To control compiler optimizations for your Real-Time Workshop makefile build at Simulink GUI level, use the Compiler optimization level parameter. The Compiler optimization level parameter provides

The default setting is Optimizations off (faster builds). Selecting the value Custom enables the Custom compiler optimization flags field, in which you can enter custom compiler optimization flags (for example, -O2).

For more information about the Compiler optimization level parameter and its values, see Compiler optimization level and Custom compiler optimization flags in the Real-Time Workshop reference.

Specifying TLC Options

You can enter Target Language Compiler (TLC) command line options in the TLC options edit field, for example

Specifying TLC options does not add any flags to the Make command field, as do some of the targets available in the System Target File Browser.

For additional information, see Setting Target Language Compiler Options for details, as well as the Target Language Compiler documentation.

Specifying Whether To Generate a Makefile

The Generate makefile option specifies whether the Real-Time Workshop build process is to generate a makefile for a model. By default, the Real-Time Workshop build process generates a makefile. You can suppress the generation of a makefile, for example in support of custom build processing that is not based on makefiles, by clearing Generate makefile . When you clear this option,

Specifying a Make Command

A high-level M-file command, invoked when a build is initiated, controls the Real-Time Workshop build process. Each target has an associated make command. The Make command field displays this command.

Almost all targets use the default command, make_rtw. Third-party targets might supply another make command. See the vendor's documentation.

In addition to the name of the make command, you can supply arguments in the Make command field. These arguments include compiler-specific options, include paths, and other parameters. When the build process invokes the make utility, these arguments are passed along in the make command line.

Template Makefiles and Make Options lists the Make command arguments you can use with each supported compiler.

Specifying the Template Makefile

The Template makefile field has these functions:

If you specify your own template makefile, be sure to include the filename extension. If you omit the extension, the Real-Time Workshop build process attempts to find and execute a file with the extension .m (that is, an M-file). The template make file (or an M-file that returns a template make file) must be on the MATLAB path. To determine whether the file is on the MATLAB path, enter the following command in the MATLAB Command Window:

which tmf_filename
  


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