1 % Copyright (C) 2013-2014 Czech Technical University in Prague
4 % - Carlos Jenkins <carlos@jenkins.co.cr>
6 % This document contains proprietary information belonging to Czech
7 % Technical University in Prague. Passing on and copying of this
8 % document, and communication of its contents is not permitted
9 % without prior written authorization.
11 % File : rpp_select_callback_handler.m
13 % RPP Target select callback handler.
15 % This callback function is triggered whenever the user selects the target
16 % in the System Target File Browser. Default values for Simulation and
17 % configurations parameters are set. Some options are disabled if it is not
18 % allowed to be changed by user.
24 function rpp_select_callback_handler(hDlg, hSrc)
26 % Setup the hardware configuration
27 %slConfigUISetVal(hDlg, hSrc, 'ProdHWDeviceType', 'Texas Instruments->RM48');
29 % The target is model reference compliant
30 slConfigUISetVal(hDlg, hSrc, 'ModelReferenceCompliant', 'on');
31 slConfigUISetEnabled(hDlg, hSrc, 'ModelReferenceCompliant', false);
33 % Set the target language to C and disable modification
34 slConfigUISetVal(hDlg, hSrc, 'TargetLang', 'C');
35 slConfigUISetEnabled(hDlg, hSrc, 'TargetLang', false);
38 slConfigUISetVal(hDlg, hSrc, 'SolverType', 'Fixed-step');
39 slConfigUISetVal(hDlg, hSrc, 'Solver', 'FixedStepDiscrete');
41 % Hardware being used is the production hardware
42 slConfigUISetVal(hDlg, hSrc, 'ProdEqTarget', 'on');
44 % For real-time builds, we must generate ert_main.c
45 slConfigUISetVal(hDlg, hSrc, 'ERTCustomFileTemplate', 'rpp_file_process.tlc');
46 slConfigUISetVal(hDlg, hSrc, 'GenerateSampleERTMain', 'off');
47 slConfigUISetEnabled(hDlg, hSrc, 'GenerateSampleERTMain', false);
49 % Set the TargetLibSuffix
50 slConfigUISetVal(hDlg, hSrc, 'TargetLibSuffix', '.a');
53 slConfigUISetVal(hDlg, hSrc, 'ExtModeMexArgs', ['1 ''ttyUSB0'' 115200']);
55 % Configure PostCodeGen Command to execute
56 % (library code inclusion for compilation)
57 %% Note: No longer needed with static library
58 %% Leaving here for future reference.
59 %%slConfigUISetVal(hDlg, hSrc, 'PostCodeGenCommand', ...
60 %% 'rpp_lib_support(modelName, buildInfo)');