Part Number: TMS320F28377D
Tool/software: Code Composer Studio
I have been debugging some time-critical code running out of RAM, and now when I run out of Flash, I get some amount of performance degradation (SYSCLK= 150MHz, Flash Wait States = 2). So I've been moving routines into ram using #pragma CODE_SECTION(<func_name>, ".TI.ramfunc");
Once I do this too liberally, the linker informs me that I don't have a contiguous block of memory that is big enough for everything I've tried to put into RAM using this directive.
"C:/Users/sbeiter/workspace_v7/my_project/2837xD_FLASH_lnk_cpu1.cmd", line 93: error #10099-D: program will not fit into available memory. run placement with alignment/blocking fails for section ".TI.ramfunc" size 0x108f page 0. Available memory ranges:
RAMLS0 size: 0x800 unused: 0x800 max hole: 0x800
RAMLS1 size: 0x800 unused: 0x800 max hole: 0x800
RAMLS2 size: 0x800 unused: 0x800 max hole: 0x800
RAMLS3 size: 0x800 unused: 0x800 max hole: 0x800
RAMGS14 size: 0x1000 unused: 0x1000 max hole: 0x1000
RAMGS15 size: 0x1000 unused: 0x1000 max hole: 0x1000
I had already modified the supplied linker command file by including GS14 and GS15 in the available RAM space back when I went over the 0x0800:
.TI.ramfunc : {} LOAD = FLASHD,
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3|RAMGS14|RAMGS15,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
I guess I'm unsure why the linker is looking for a contiguous block and also why it doesn't recognize the adjacency of LS0 to LS3, which really represents 0x800 x 4? Is there a syntax for concatenating these blocks together? I suppose I could just make RAMLS0 look like a contiguous block of 4 x 0x800, but is there a preferred or recommended way other than this or getting a bigger chunk of RAM for program? I could also declare a second section .TI.ramfunc2 or something, but I'd like to do this the way TI recommends, if possible. Obviously there is plenty of memory there, just want to be sure I am using the linker command file capabilities appropriately. Thanks!