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/TMS320F28377D: Program will not fit into available memory

Part Number: TMS320F28377D

Tool/software: Code Composer Studio

Hi community!

I have a problem in fitting my program in memory. I have defined a large number of float variables in my code. I got this linking error:

"

program will not fit into available memory. placement with alignment/blocking fails for section ".text" size 0x1ff7 page 0. Available memory ranges:
RAMM0 size: 0x2de unused: 0x4 max hole: 0x4
RAMD0 size: 0x800 unused: 0x6 max hole: 0x6
RAMLS0 size: 0x800 unused: 0x5 max hole: 0x5
RAMLS1 size: 0x800 unused: 0x32b max hole: 0x32b
RAMLS2 size: 0x800 unused: 0x800 max hole: 0x800
RAMLS3 size: 0x800 unused: 0x800 max hole: 0x800
RAMLS4 size: 0x800 unused: 0x800 max hole: 0x800

"

I have modified ".cmd" file as:

.text : >> RAMM0 | RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3 | RAMLS4, PAGE = 0
.cinit : > RAMM0 | RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4, PAGE = 0

How can I extend the memory more than this. Is it possible to use RAMGS14 and RAMGS15 on page 1 ? Is there any way to move them to PAGE 0 ? Its vital for me I really need more memory for defining variables. For example is it correct :

PAGE 0:

.
.
RAMLS3      : origin = 0x009800, length = 0x000800
RAMGS14 : origin = 0x01A000, length = 0x001000
RAMGS15 : origin = 0x01B000, length = 0x001000
RESET      : origin = 0x3FFFC0, length = 0x000002

SECTIONS

{

.text : >> RAMM0 | RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3 | RAMLS4 | RAMGS15, PAGE = 0
.cinit : > RAMM0 | RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4RAMGS14, PAGE = 0

 

Regards

  • you can move RAMGS to page 0. But the memory map is not contiguous with LS memories.

    You may need to some some other sections to RAMGS so that you can accommodate the text section to RAMLS.

    Other option is to use the flash memory for keeping your code section.

    Regards

    Baskaran

  • Hi Baskaran and thanks for reply,

    I couldn't get this part of the answer: 

    "You may need to some some other sections to RAMGS so that you can accommodate the text section to RAMLS"

    Would you please explain it more? what happens when LS memories are not contiguous with GS memories?

    Regards

  • Linker placement will fail if the memories are not contiguous.

    "You may need to some some other sections to RAMGS so that you can accommodate the text section to RAMLS"

    I suggested to move other sections like .data .bss etc to move to RAMGS so that you can fit all of your code in RAMLS.