We are running our code from flash in order to save RAM space.
However, we would like to run some time critical functions from RAM to get the full 150MIPS performance.
We have been following SPRA958I and have declared some functions to run from RAM using CODE SECTION.
e.g.
#pragma CODE_SECTION(CheckForHeartbeat, "ramfuncs");
ramfuncs : LOAD = FLASHD,
RUN = RAML0,
LOAD_START(_ramfuncsLoadStart),
LOAD_END(_ramfuncsLoadEnd),
RUN_START(_ramfuncsRunStart),
PAGE = 0
This runs the function out of RAM and gives a slight performance improvement, but is still slower than expected.
I think this is because some of the math library functions (in rts2800_fpu32) that this function uses are still in FLASH.
I have tried the following:
#pragma CODE_SECTION(cos, "ramfuncs");
but the function is still in flash....
00322cee 0000005e rts2800_fpu32_eh.lib : cos.obj (.text)
00322cee _cos
How can I get time critical functions in rts2800_fpu32 to reside in RAM?