This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I am fairly new to this, so please excuse any ignorant or seemingly stupid questions - I am still learning here (so be gentle!)
I have built an application on an F28335 eval kit. I have built my system to boot from flash, and then I want to move a lot of the time critical routines into RAM. I have managed to do that following the examples and documentation with no significant problems.
However, as part of this, I also need to put the math libraries into RAM for quicker execution as well. I have found the way to do that in the linker file is doing something like:
.rts { -lrts2800_fpu32.lib (.tex) } >> RAML3, PAGE = 0
This works great for the initial running of the system, and everything runs fine when I start the application from the debugger. However, when I power cycle the device, I would like it to immediately boot from flash, and begin running again (after re-initializing RAM properly). However, that is not the case because of the math library.
I move my own code sections into RAM using the memcopy command like is specified in the documentation - I do this as part of the init routine. It looks something like this:
(in linker file):
ramfuncs : LOAD = FLASHD,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
(in init code):
memcpy(&RamfuncsRunStart,
&RamfuncsLoadStart,
&RamfuncsLoadEnd - &RamfuncsLoadStart);
However, I cannot figure out how to move the library into RAM at run time in a similar manner.
So my question is how would I affect the same copy from flash and into RAM after a reset or power cycle of the linked in library routines? What is normally done about things
like this? If I leave the math library in flash and do not move it to RAM in the linker file, everything works splendidly and will come back after the power cycle. I just cannot have
the performance impact that this causes, so I need to move the libraries into RAM.
Any help or suggestions would be greatly appreciated! Thanks!
-Jeff
Hi Jeff,
Im not sure(Im still looking) if there is a way to do this with the RTS library but if you are looking for faster math routines may I suggest using the FPUfastRTS library. You can find it in controlSUITE (www.ti.com/controlSUITE) under c:\ti\controlSUITE\libs\math\FPUfastRTS
This post may help:-
http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/183181/677051.aspx#677051
Hi Paul,
Thanks do much for the followup and suggestion. I actually found that I could load the functions into RAM during the boot phase so that the copying and linking were unnecessary.
I simply loaded in the file DSP28xxx_SectionCopy_nonBIOS.asm, and then during the code_start section in DSP2833x_CodeStartBranch.asm,, instead of jumping directly to _c_int00 to start running, I call out to copy_sections, where I just copy the math directly to RAM. After that I jump to _c_int00, and let it run from there. Now there is no need for any subsequent copy, as it is all done during boot.
Thanks for the suggestion though!
-Jeff