]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/blob - rpp/rpp/rpp_select_callback_handler.m
Implemented target_tools makefile for CCS. Added setup script for installing.
[pes-rpp/rpp-simulink.git] / rpp / rpp / rpp_select_callback_handler.m
1 % Copyright (C) 2013 Czech Technical University in Prague
2 %
3 % Authors:
4 %      - Carlos Jenkins <carlos@jenkins.co.cr>
5 %
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.
10 %
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.
15 %
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/>.
18 %
19 % File : rpp_select_callback_handler.m
20 % Abstract:
21 %       Custom callback funtion for rtwgensettings.SelectCallback event.
22 %       Default values of Simulation configurations parameters are set.
23 %       Some options are disabled if it is not allowed to be changed by user.
24 %       Reference: rtw_ug.pdf p. 1211?
25
26
27 function rpp_select_callback_handler(hDlg, hSrc)
28
29     % The target is model reference compliant
30     slConfigUISetVal(hDlg, hSrc, 'ModelReferenceCompliant', 'on');
31     slConfigUISetEnabled(hDlg, hSrc, 'ModelReferenceCompliant', false);
32
33     % Setup the hardware configuration
34     slConfigUISetVal(hDlg, hSrc, 'ProdHWDeviceType', 'Texas Instruments->TMS570');
35
36     % Hardware being used is the production hardware
37     slConfigUISetVal(hDlg, hSrc, 'ProdEqTarget', 'on');
38
39     % Configure solver
40     slConfigUISetVal(hDlg, hSrc, 'SolverType', 'Fixed-step');
41     slConfigUISetVal(hDlg, hSrc, 'Solver', 'FixedStepDiscrete');
42
43     % Set the target language to C and disable modification
44     slConfigUISetVal(hDlg, hSrc, 'TargetLang', 'C');
45     slConfigUISetEnabled(hDlg, hSrc, 'TargetLang', false);
46
47     % Set the TargetLibSuffix
48     slConfigUISetVal(hDlg, hSrc, 'TargetLibSuffix', '.a');
49
50     % For real-time builds, we must generate ert_main.c
51     slConfigUISetVal(hDlg, hSrc, 'ERTCustomFileTemplate', 'rpp_file_process.tlc');
52