oIdx = oIdx + 1;
+ rtwoptions(oIdx).prompt = 'Target configuration file name';
+ rtwoptions(oIdx).type = 'NonUI';
+ rtwoptions(oIdx).default = 'RM48L952.ccxml';
+ rtwoptions(oIdx).tlcvariable = 'rppTargetConfFileName';
+ rtwoptions(oIdx).makevariable = 'RPP_CCXML_FILE_NAME';
+ rtwoptions(oIdx).tooltip = ['The name of the platform specific target configuration file.'];
+
+ oIdx = oIdx + 1;
rtwoptions(oIdx).prompt = 'Download compiled binary to RPP.';
rtwoptions(oIdx).type = 'Checkbox';
RELATIVE_PATH_TO_ANCHOR = |>RELATIVE_PATH_TO_ANCHOR<|
MODELREF_TARGET_TYPE = |>MODELREF_TARGET_TYPE<|
-#--------------------------- Linker script value -------------------------------
+#--------------------------- Linker script and target config files---------------
RPP_LD_SCRIPT_FILE_NAME = |>RPP_LD_SCRIPT_FILE_NAME<|
+RPP_CCXML_FILE_NAME = |>RPP_CCXML_FILE_NAME<|
+
#-- In the case when directory name contains space ---
ifneq ($(MATLAB_ROOT),$(ALT_MATLAB_ROOT))
% Readme file in <cssroot>/ccs_base/scripting/examples/loadti/readme.txt
% OpenOCD wiki at https://rtime.felk.cvut.cz/hw/index.php/TMS570LS3137#OpenOCD_setup_and_Flashing
-function rpp_download(modelName, buildDirectory, use_openocd, use_sdram)
+function rpp_download(modelName, buildDirectory, use_openocd, use_sdram, ccxml_filename)
RppLibRoot = getpref('rpp', 'RppLibRoot');
CCSRoot = getpref('rpp', 'CCSRoot');
else
disp(['### Downloading ', modelName, ' to RPP board...']);
if isunix
+ ccxml_filename = strcat(RppLibRoot, '/../loadti/', strrep(char(ccxml_filename), '"', ''));
% -r, --reset Reset target before run
% -c, --cfg-file=CONFIG_FILE Target setup config file
command = [...
'CCS_SCRIPTING="' CCSRoot '/ccs_base/scripting/" ' ...
'"' RppLibRoot '/../loadti/loadti.sh" -r ' ...
- '-c "', RppLibRoot, '/../loadti/RM48L952.ccxml" ', ...
+ '-c "', ccxml_filename, '" ', ...
'"', outfile, ...
'" 2> "', downloadLog, '"'];
else
+ ccxml_filename = strcat(RppLibRoot, '\..\loadti\', strrep(char(ccxml_filename), '"', ''));
% -r, --reset Reset target before run
% -c, --cfg-file=CONFIG_FILE Target setup config file
command = [...
'set CCS_SCRIPTING="' CCSRoot '\ccs_base\DebugServer"&&' ...
'"' RppLibRoot '\..\loadti\loadti.bat" -r ' ...
- '-c "', RppLibRoot, '\..\loadti\RM48L952.ccxml" ', ...
+ '-c "', ccxml_filename, '" ', ...
'"', outfile];
end
disp('### Running downloader script:');
use_openocd = str2double(makertwArgs(i).Value);
elseif strcmp(makertwArgs(i).DisplayLabel, 'RPP_DOWNLOAD_TO_SDRAM')
use_sdram = str2double(makertwArgs(i).Value);
+ elseif strcmp(makertwArgs(i).DisplayLabel, 'RPP_CCXML_FILE_NAME')
+ ccxml_filename = makertwArgs(i).Value;
end
end
if getenv('RPP_NO_DOWNLOAD')
disp(['RPP_NO_DOWNLOAD defined - skipping downloading to target.'])
else
- rpp_download(modelName, makertwBuildDirectory, use_openocd, use_sdram);
+ rpp_download(modelName, makertwBuildDirectory, use_openocd, use_sdram, ccxml_filename);
end
end