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.

CCS: CMD: size is not enough

Tool/software: Code Composer Studio

I define a data group Uint8 buf[8600]. and I met the error:

>> error: can't allocate .stack, size 000a1800 (page 0) in L2RAM (avail:
00020000)
>> error: can't allocate .sysmem, size 000a1800 (page 0) in L2RAM (avail:
00020000)
>> error: errors in input - ./Debug/laneAlgor.out not built

>> Compilation failure

the CMD file is as below:

/*
* Linker command file
*
*/

-stack 0x00001800 /* Stack Size */
-heap 0x00001800 /* Heap Size */

MEMORY
{
L2RAM: o = 0x10800000 l = 0x00020000
DDR2: o = 0x80000000 l = 0x10000000
Flash: o = 0x90000000 l = 0x00400000
}

SECTIONS
{
.bss > L2RAM
.cinit > L2RAM
.cio > L2RAM
.const > L2RAM
.data > L2RAM
.far > L2RAM
.stack > L2RAM
.switch > L2RAM
.sysmem > L2RAM
.text > L2RAM
.ddr2 > DDR2
.buffer > DDR2
}

should I increase heap or stack or change the allocation in section(ex:change all L2RAM to DDR2)

  • Hi Emma,
    A lot of sections are being allocated to L2RAM and looks like you have run out of room there. You will need to allocate some sections to DDR2, where there is much more room. There are definitely some sections you want to run from L2RAM but perhaps .text would be a good candidate to move to DDR2

    Thanks
    ki