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.

TMS320F28379D: program will not fit into available memory / gen_func_subsections

Part Number: TMS320F28379D

Hi all,

As I add more and more codes I often have the error "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."  .

I am building my program into RAM, at the beginning I was manually changing the cpu1.cmd by increasing the length of RAMLS5 and 6 and then I was able to compile but now I am at a point where I need to increase RAMD0 | RAMD1 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 but when I try to increase them, either I still have an error or it starts another error in RAMLS4 too small ect...

What is the point of choosing manually the length memory when I am not trying to optimize my code?

I am really surprised, my program is not complex, I am reading some stuff on SPI and try to send them to UART...

I checked and try to ON/OFF gen_func_subsections but it did not do anything.

So my question is, do you have a way to automatically size the memory without of worried about that kind of stuff?

Thank you

  • Hi,

    You can check the .map file to get the actual size of each section. This would help you understand which file or which function is consuming more size.

    It also gives the memory usage of all memories. This tells you the unused memories which can be used for allocating the sections.

    Regards,

    Veena

  • Thank you Veena,

    Indeed, after checking the .map I have been been able to resolve my issue.

    But I am still curious, building in RAM should be used to quickly try new lines of code or debug stuff, but from what I see, you can have a big program that would fit in FLASH but not in RAM right? What would you do in that case?

    And I still have my second question, developing a program is enough to deal with, why would we manually need to change the length memory, is that not the role of the compiler to deal with this task?

    Best,

  • Hi,

    But I am still curious, building in RAM should be used to quickly try new lines of code or debug stuff, but from what I see, you can have a big program that would fit in FLASH but not in RAM right? What would you do in that case?

    Yes, the devices usually have more FLASH memory compared to RAM. If the total program size is more than the total RAM size, it would be difficult to do RAM-only execution. In such cases, you may have to use both Flash and RAM. Are you seeing any issues in allocating programs to RAM even if the total size is less than total RAM size?

    And I still have my second question, developing a program is enough to deal with, why would we manually need to change the length memory, is that not the role of the compiler to deal with this task?

    The memory lengths should not be updated. It is the actual size of the memory in the device. You would need to update them only in case you combine memory blocks 

    Eg:

       RAMLS1           : origin = 0x008800, length = 0x000800
       RAMLS2           : origin = 0x009000, length = 0x000800
    can be replaced to:
       RAMLS1_2           : origin = 0x008800, length = 0x001000
    0x800 is the actual size of RAMLS1 and LS2 on the device.
    Regards,
    Veena
  • Thank you Veena for the explanation.