Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

switchTarget - Specify target for configuration set

Syntax

switchTarget('config_set', 'sys_tgt_file', target_options)

Description

switchTarget('config_set', 'sys_tgt_file', target_options) specifies a system target file for the configuration set that you specify.

Inputs

config_set

Handle to the active configuration set for the model.

sys_tgt_file

String that specifies a system target file.

target_options

Structure of field and value pairs to optionally specify the template makefile, TLC options, make command, and description associated with the target. If you do not want to use any options, you must specify an empty structure ([]).

FieldValue
TemplateMakefileString specifying file name of template makefile.
TLCOptionsString specifying TLC argument.
MakeCommandString specifying make command M-file.
DescriptionString specifying a description of the target.

Examples

Select an ert.tlc system target file for the active configuration set:

% Get the active configuration set for 'model'
cs = getActiveConfigSet(model);
% Define a system target file
stf = 'ert.tlc';
% Change the system target file for the configuration set.
switchTarget(cs,stf,[]);

Specify an ert.tlc system target file and target options for the active configuration set:

% Get the active configuration set for 'model'
cs = getActiveConfigSet(model);
% Define a system target file
stf = 'ert.tlc';
% Specify target options
tgtOpt.TemplateMakefile = 'grt_default_tmf'; 
tgtOpt.TLCOptions = '-aVarName=1'; 
tgtOpt.MakeCommand = 'make_rtw'; 
tgtOpt.Description = 'my target'; 
% Change the system target file and target options
% for the configuration set.
switchTarget(cs,stf,tgtOpt);

Alternatives

To select system target files using the Configuration Parameters dialog box:

  1. In your model, open the Configuration Parameters dialog box.

  2. Navigate to the Real-Time Workshop > General pane.

  3. Specify the System target file.

  4. Optionally specify , Make command, and TLC options.

  5. Click Apply.

How To

  


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