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: memory problem

Part Number: TMS320F28377D


Tool/software: Code Composer Studio

I have a program I will call A on the TI Delfino, TMS320F28377D, that I have been using for a few months.  Optimizer assistant reports code size of 5,843 bytes.

I have some additional features that I want to add to code A.  I built separate code to test the features, code B.  Code B uses a header file that I created to store the functions used by code B.  Code B works fine.

I then added the code B header file to the code A project and the #include code B header declaration to code A.  But now code A will not compile.  I ran Optimizer assistant and now have a code size of 7,650 bytes.

If I comment out the #include code B header declaration it will compile.

It appears that I have memory available, any suggestions?

"D:/JohnB/CCS/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 54: error #10099-D: 

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

  • Hi John,

    It appears that there's not enough memory assigned to the .text section There are a couple of ways to allocate more memory to this section.

    1.) If there's more than one memory range allocated to this section, you can modify the .cmd file and allow for a larger .text section. This can be done by "splitting" the .text section among multiple memory regions. This can be done by adding (>>) to the .text assignment.

    2.) You can tell the linker to allocate as a whole into the first memory range in which it fits completely. This can be done by adding (>) to the .text assignment.

    3.) You can try combining contiguous RAM blocks or flash sectors to make a larger block for code.

    For more information on how to implement these changes, please refer to this page:

    Regards,

    Ozino

  • Thank you for the quick response and the helpful information.

    My problem was actually a coding problem.  I had not coded my header files with #includes properly and the compiler thought I needed more space than I did.  I changed one of my new headers to a *.c file and cleaned up the #includes.  Then my code would 'fit' into memory.  I browsed the Memory Allocation for the working version vs. the non-working version.

    Working Version

    M0 .cint / ramfunc / .text.1 734 bytes
    D0 .text.4 2037 bytes
    LS0 .text.2 1570 bytes
    LS1 .text.3 793 bytes

    Non-Working Version

    M0 .cint / ramfunc / .text.2 732 bytes
    D0 .text.4 2043 bytes
    LS0 .text.3 1576 bytes
    failed allocation .text.1 3091 bytes
  • Hi John,

    I see. Glad to hear that you figured out the problem. Let me know if you have any other questions.

    Regards,
    Ozino