Hi,
when using the Code Optimizer it uses the Functions prolog_c28x_1, prolog_c28x_2, prolog_c28x_1, epilog_c28x_1 and epilog_c28x_2.
They are executed before an after each function call.
These functions are usually located in FLASH. As i need to program the internal FLASH i must run all Functions from RAM during Firmware update.
All other Functions i use during Firmware update are loaded to RAM but i as prolog and epilog are executed without my control, the CPU crashes after erasing FLASH.
i have tired to move those Functions to RAM using:
fastcode { *(ramfuncs)
-l = rts2800_ml.lib<epilog.obj>(.text)
-l = rts2800_ml.lib<prolog.obj>(.text)
}
LOAD = FLASH,
RUN = H0SARAM,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
in the linker .cmd file as i usually do.
When linking i get the following errors:
error #10056: symbol "_realloc" redefined: first defined in app_p28L.o28L redefined in rts2800_ml.lib<memory.obj>"
error #10056: symbol "_free" redefined: first defined in app_p28L.o28L redefined in rts2800_ml.lib<memory.obj>"
error #10056: symbol "_calloc" redefined: first defined in app_p28L.o28L redefined in rts2800_ml.lib<memory.obj>"
error #10056: symbol "_malloc" redefined: first defined in app_p28L.o28L redefined in rts2800_ml.lib<memory.obj>"
How can i move the prolog and epilog functions to RAM?
MCU: TMS320F2812
Compiler: v16.6.0.STS
CCS: 6.2
BIOS: 6.46.1.38
XDC: 3.32.1.22_core