1 % Copyright (C) 2013 Czech Technical University in Prague
4 % - Carlos Jenkins <carlos@jenkins.co.cr>
6 % This program is free software; you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation; either version 2 of the License, or
9 % (at your option) any later version.
11 % This program is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
16 % You should have received a copy of the GNU General Public License
17 % along with this program. If not, see <http://www.gnu.org/licenses/>.
19 % File : rpp_select_callback_handler.m
21 % RPP Target select callback handler.
23 % This callback function is triggered whenever the user selects the target
24 % in the System Target File Browser. Default values for Simulation and
25 % configurations parameters are set. Some options are disabled if it is not
26 % allowed to be changed by user.
32 function rpp_select_callback_handler(hDlg, hSrc)
34 % Setup the hardware configuration
35 %slConfigUISetVal(hDlg, hSrc, 'ProdHWDeviceType', 'Texas Instruments->TMS570');
37 % The target is model reference compliant
38 slConfigUISetVal(hDlg, hSrc, 'ModelReferenceCompliant', 'on');
39 slConfigUISetEnabled(hDlg, hSrc, 'ModelReferenceCompliant', false);
41 % Set the target language to C and disable modification
42 slConfigUISetVal(hDlg, hSrc, 'TargetLang', 'C');
43 slConfigUISetEnabled(hDlg, hSrc, 'TargetLang', false);
46 slConfigUISetVal(hDlg, hSrc, 'SolverType', 'Fixed-step');
47 slConfigUISetVal(hDlg, hSrc, 'Solver', 'FixedStepDiscrete');
49 % Hardware being used is the production hardware
50 slConfigUISetVal(hDlg, hSrc, 'ProdEqTarget', 'on');
52 % For real-time builds, we must generate ert_main.c
53 slConfigUISetVal(hDlg, hSrc, 'ERTCustomFileTemplate', 'rpp_file_process.tlc');
54 slConfigUISetVal(hDlg, hSrc, 'GenerateSampleERTMain', 'off');
55 slConfigUISetEnabled(hDlg, hSrc, 'GenerateSampleERTMain', false);
57 % Set the TargetLibSuffix
58 slConfigUISetVal(hDlg, hSrc, 'TargetLibSuffix', '.a');
60 % Configure PostCodeGen Command to execute
61 % (library code inclusion for compilation)
62 slConfigUISetVal(hDlg, hSrc, 'PostCodeGenCommand', ...
63 'rpp_lib_support(modelName, buildInfo)');