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.

TMS320F280049: Code Composer Studio Link error #10010 program will not fit into available memory

Part Number: TMS320F280049

I'm a hardware guy fudging my way through some embedded C code (not my area of expertise)

Code Composer Studio Link error #10010 program will not fit into available memory

I'm porting code from a SAMD21g17  (128K FLASH, 16K x8 RAM),   to a F280049 (256KB FLASH, 100K x8 RAM)

The project was linking until I added a bit more code. The code still links when building the release version, however the debug version now fails to link with the above error.

If I reduce the heap and stack size from the original 0x300 to 0x100 the project will link.

1) How do I determine a suitable heap and stack size, and will CCS warn me if the heap or stack is too small?

2) I still have a fair bit of code to migrate, it seems like I'm going to need to reconfigure the memory as I'm obviously up against a limit that must be specified somewhere in the project because I was only using a fraction of the memory in the SAMD part and the F280049 has 6x the RAM space. Where would this be defined?

  • Hi Jeff,

    In the linker error, it should say which section is not fitting in the memory. You can increate the size for that section.

    If you can post the exact error, I can guide you through this.

    Take a look at this links which explains how to split the section into multiple memory section.

    https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html

    Thanks & Regards,

    Santosh

  • Jeff,

    Looking at the image, it looks like .ebss section is getting out of memory.

    Open the linker command file, and you can add another memory section to use.

    Something like below. 

    ..ebss : >> RAMLS4 | RAMLS5

    Thanks & Regards,

    Santosh

  • Santosh,

    I changed  

    .ebss            : > RAMLS5,    PAGE = 1   

        to

    .ebss            : > RAMLS4|RAMLS5,    PAGE = 1  

    Link error is

    <Linking>
    "../28004x_generic_ram_lnk.cmd", line 107: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment/blocking fails for section ".ebss" size 0xf7page 1.  Available memory ranges:
       RAMLS5       size: 0x800        unused: 0x1          max hole: 0x1       
       RAMLS6       size: 0x800        unused: 0x49         max hole: 0x48      
    error #10010: errors encountered during linking; "ELS-E105-G1.out" not built
     
    >> Compilation failure
    makefile:174: recipe for target E105-G1.out' failed
    gmake[1]: *** [E105-G1.out] Error 1
    makefile:170: recipe for target 'all' failed
    gmake: *** [all] Error 2

    **** Build Finished ****

    Link code is here

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    MEMORY
    {
    PAGE 0 :
    /* BEGIN is used for the "boot to Flash" bootloader mode */
    BEGIN : origin = 0x080000, length = 0x000002
    RAMM0 : origin = 0x0000F5, length = 0x00030B
    RAMLS0 : origin = 0x008000, length = 0x000800
    RAMLS1 : origin = 0x008800, length = 0x000800
    RAMLS2 : origin = 0x009000, length = 0x000800
    RAMLS3 : origin = 0x009800, length = 0x000800
    RAMLS4 : origin = 0x00A000, length = 0x000800
    RESET : origin = 0x3FFFC0, length = 0x000002
    /* Flash sectors */
    /* BANK 0 */
    FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE /* on-chip Flash */
    FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Jeff,

    Try something like this:

    .ebss            : > RAMLS5 | RAMLS7,    PAGE = 1    // Oct18,2022 Jeff JJJJJ jeffs version

    or 

    .ebss            : > RAMGS0,    PAGE = 1    //Oct18,2022 Jeff JJJJJ jeffs version

    Thanks & Regards,

    Santosh

  • Here is updated one:

    .ebss            : >>  RAMLS5 | RAMLS7,    PAGE = 1    // Oct18,2022 Jeff JJJJJ jeffs version

    or 

    .ebss            : > RAMGS0,    PAGE = 1    //Oct18,2022 Jeff JJJJJ jeffs version

  • Santosh,

    I tried all sorts of combinations none work.

    I have several tables (Arrays) that will be reduced in the final version, I tried reducing one of these arrays to see if that helped and it did. So I guess I;m going to live with the smaller heap and stack for now, and then when I shrink the tables I can increase the stack and heap size.

    How do I gauge if the stack and heap are large enough at the moment?

  • Jeff,

    For stack and heap, please take a look at this AppNote.

    https://www.ti.com/lit/sprad47

    Thanks & Regards,

    Santosh