Hello everyone. I’m developing an application in Matlab-Simulink (2013a) with Embedded-Coder to run on a TMS32028335. The workflow is working fine with the makefile method which generates an .out file I can directly load into CCSv5.
I’m quite tight on processng time and therefore need to enhance the performance by executing from RAM (I have measured about 40% longer cycle times on Flash). Therefore I tried to implement the method described in SPRAAU8. Memory consumption of both Flash and RAM is reasonably low (and could be further optimized) so this should be no problem.
My problem is that I can’t get it to run, although everything seems to be in its place. Following I describe the steps I take (following SPRAAU8) to implement the copy to RAM method:
- Modify the following original files:
- DSP2833x_usDelay.asm: change .sect “ramfuncs” in DSP280x_usDelay.asm to .text
- DSP2833x_SysCtrl.c: remove #pragma CODE_SECTION(InitFlash, “ramfuncs”);
- In Simulink’s Coder Target Settings, REMOVE from the Source Files to be included list:
- $(MATLAB_ROOT)\toolbox\idelink\extensions\ticcs\src\DSP2833x_CodeStartBranch.asm
- $(MATLAB_ROOT)\toolbox\idelink\extensions\ticcs\src\DSP2833x_usDelay.asm
- $(MATLAB_ROOT)\toolbox\idelink\extensions\ticcs\src\DSP2833x_SysCtrl.c
- And ADD to the same list:
- spraau8\Flash_to_RAM\src\DSP28xxx_CodeStartBranch.asm
- spraau8\Flash_to_RAM\src\DSP28xxx_SectionCopy_nonBIOS.asm
- DSP2833x_SysCtrl.c (modified)
- DSP2833x_usDelay.asm (modified)
- spraau8\Flash_to_RAM\cmd\F2833x F2833x_nonBIOS_flash.cmd renamed as projectname.cmd
According to Mathworks, I don’t need to suppress the generated .cmd file, as the generated file will be replaced by a supplied custom file if the name coincides. When looking at the generated .mk, searching for “.cmd” I can see tha in fact the provided file is used:
LIBRARY_FILES := $(call FORMAT_PATH,C:\spraau8\Flash_to_RAM\cmd\F2833x\test3.cmd)
Am I missing something?
I attach the resulting out and .mk files. Loading the .out into CCSv5 will allow you to see the source code, but if any further files could be useful to identify the problem please let me know and I'll upload them as well. 0045.test3.zip
Best regards and thanks in advance!
Martin
