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/>.
21 % This file script adds paths for RPP target to the MATLAB path.
22 % IMPORTANT: This script _MUST_ be run by user after installing before
23 % using the target. To do so:
24 % 1. Extract target package.
25 % 2. Change directory (cd) to this file folder.
26 % 3. Execute rpp_setup();
32 % Install target on user's environment
35 % Get current target path in user's filesystem
37 tgtpath = curpath(1:end-length('/rpp'));
39 % Add target system folders to Matlab path
40 addpath(fullfile(tgtpath, 'rpp'));
41 addpath(fullfile(tgtpath, 'demos'));
42 addpath(fullfile(tgtpath, 'blocks'));
43 %addpath(fullfile(tgtpath, 'help'));
46 % Ask user setup variables
47 PossiblePath = '/usr/local/ti/ccsv5/tools/compiler/arm_5.0.1';
48 CompilerRoot = fix_slash(uigetdir(PossiblePath, 'CCS Compiler root directory: (<ccs_root>/tools/compiler/arm_5.X.X)'));
54 addpref('rpp', 'CompilerRoot', CompilerRoot);
55 addpref('rpp', 'TargetRoot', fix_slash(curpath));
58 % FIXME: Implement blocks autobuild
64 % FIXME: Write and generate help
65 %cd('../help/source');
69 % Apply changes and finish
70 sl_refresh_customizations();
71 disp('<strong>RPP</strong> Target setup is complete!');
72 disp('Explore <a href="matlab:cd([getpref(''rpp'',''TargetRoot''),''/../demos''])">demos</a> directory.');
73 %disp('Explore <a href="matlab:cd([getpref(''rpp'',''TargetRoot''),''/../demos''])">demos</a> directory and access <a href="matlab:doc -classic">documentation</a>');
77 function path = fix_slash(path0)