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.

.cstack issue in TMS320C28346

Other Parts Discussed in Thread: TMS320C28346

Hello,

I am targeting TMS320C28346.

My program captures 32-bit values from Ecap peripheral.  I set up a global buffer volatile Uint32 ecapbuffer[2] where I would like to collect 2 consecutive Ecap values. My program fails to compile with error at

.stack           : > RAMM1,     PAGE = 1

../28346_RAM_lnk.cmd", line 125: error #10099-D: program will not fit into

   available memory.  run placement with alignment/blocking fails for section

   ".stack" size 0x600 page 1.  Available memory ranges:

   RAMM1        size: 0x400        unused: 0x400        max hole: 0x400

 

How do I fix this problem?

Thanks

Monika

 

 

 

  • Monika,

    You have the stack size specified as 0x600 words in your project linker settings.  But the RAMM1 memory you are trying to link the stack to is only 0x400 words long.  Hence, it won't fit.  That is exactly what the error message is telling you.

    A stack size of 0x600 is pretty large.  Was this deliberate?

    Assuming you cannot reduce the stack size, you need to increase the size of the memory you link the stack to.  Try combining the RAMM1 and RAMM0 in your linker .cmd file into a single, 0x800 long memory.  Call it RAMM0M1 for example.  Start address will be 0x0000, and length will be 0x800.  Right now, you have each as a seperate 0x400 length memory.

    Regards,

    David

  • Hi David,

    No, I don’t think I need the stack size of 0x600.  I can change that back to 0x300, which I think is a default. 

    A follow-up question to you comment.  Right now the .cstack is:   .stack           : > RAMM1,     PAGE = 1

    Where the memory map for page 1 is:

    BOOT_RSVD    : origin = 0x000002, length = 0x000050    

    RAMM1        : origin = 0x000100, length = 0x000700     /* on-chip RAM block M1 */

    RAMLBIG      : origin = 0x00C000, length = 0x00C000

    ZONE7B       : origin = 0x20FC00, length = 0x000400     /* XINTF zone 7-data space*/

    RAMH3        : origin = 0x318000, length = 0x008000

    RAMH4        : origin = 0x320000, length = 0x008000

    RAMH5        : origin = 0x328000, length = 0x008000

     

    And page 0 is:

    PAGE 0 :

    BEGIN        : origin = 0x000000, length = 0x000002 /* Boot to M0 will go here                      */

    RAMM0        : origin = 0x000052, length = 0x0003AE

    RAML0        : origin = 0x008000, length = 0x004000  //combine RAML0 and RAML1

    ZONE7A       : origin = 0x200000, length = 0x00FC00  

     

    Are you suggesting  something similar to this below?

    BOOT_RSVD    : origin = 0x000002, length = 0x000050    

    RAMM01       : origin = 0x000100, length = 0x000700     /* on-chip RAM block M0/1 */

    RAMLBIG      : origin = 0x00C000, length = 0x00C000

     

    .stack           : > RAMM01,     PAGE = 1

    And delete RAMM0 from page 0?

    Thanks

    Monika