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.

TMS320F280039C: Can stack be placed outside M0/M1?

Part Number: TMS320F280039C


Dear Champs,

I am asking this for our customer.

They use a lot of local variables including tables in their application and find their stack usage on M0/M1 is not enough.

They want to put their stack on another RAM, especially GSx because LSx are used by CLA.

Questions:

1. If they just put .stack :>> GS0_1_2_3_4 (combining all GSx RAM from 0xC000 to 0xFFFF) in the .cmd and set 0x1000 in the linker setting --stack_size.

Does this work?

2. In c2000 compiler doc.

https://www.ti.com/lit/pdf/SPRU514Y

7.1.2 C/C++ System Stack

There is a note:

"Linking the .stack Section: The .stack section has to be linked into the low 64K of data memory. The SP is a 16-bit register and cannot access addresses beyond 64K."

What does it mean by "low 64K of data memory"?

3. Can .stack be put on discontinuous RAM? Will SP handle this discontinuity?

For example, in the .cmd,

.stack :>> GS0_1_2_3_4| M0_M1

  • 1. Yes, you can place .stack region at any RAM region falling in the address range 0-0xFFFF.

    2. Stack pointer is 16 bit wide and hence we can use SP only to access the address range 0 - 0xFFFF -> lowest 64kB in the total memory map

    3. No, .stack section cannot be split.

    Regards,

    Veena