Part Number: LAUNCHXL-F28379D
Tool/software: TI C/C++ Compiler
I want to place some code to RAM, because it works faster them from flash.
I use this code in interrupt.
void target_func __attribute__((ramfunc)) (void); works ok, but it is only 2k from RAMLS0, and if I have a bit more code linker says:
"./lnk.cmd", line 48: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".text" size 0x2b12 . Available memory ranges: FLASH size: 0x1000 unused: 0xe56 max hole: 0xe56
even if I have "RUN = RAMLS0 | RAMLS1 | RAMLS3"
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} LOAD = FLASHD,
RUN = RAMLS0 | RAMLS1 | RAMLS3,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
#else
ramfuncs : LOAD = FLASHD,
RUN = RAMLS0 | RAMLS1 | RAMLS3,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
#endif
so, I want to do own section:
.coderam : LOAD = FLASHE,
RUN = RAMLS2,
LOAD_START(_codeRamLoadStart),
LOAD_SIZE(_codeRamLoadSize),
LOAD_END(_codeRamLoadEnd),
RUN_START(_codeRamRunStart),
RUN_SIZE(_codeRamRunSize),
RUN_END(_codeRamRunEnd),
PAGE = 0, ALIGN(4)
and using with void target_func __attribute__((section(".coderam"))) (void);
But it crushes when executing and falls into ILLEGAL_ISR()