| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
switchTarget('config_set',
'sys_tgt_file', target_options)
switchTarget('config_set', 'sys_tgt_file', target_options) specifies a system target file for the configuration set that you specify.
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 ([]).
|
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);
To select system target files using the Configuration Parameters dialog box:
In your model, open the Configuration Parameters dialog box.
Navigate to the Real-Time Workshop > General pane.
Specify the System target file.
Optionally specify , Make command, and TLC options.
Click Apply.
![]() | rtwtrace | tlc | ![]() |

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 |