I seem to be limited to 2k stack and heap on the F28069. How can I increase it?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Submitted by Joe on Sat, 05/25/2013 - 08:29

 

 

When programming the TI F28069 I have noticed I get a compile error if Stack and Heap together are > 2047. If I need to, and if possible, what must I do to get past this limit?.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Sat, 05/25/2013 - 09:08.

    The reason for this is that the on-chip RAM on TI C2000 parts has 2 main sections. The first one is 2K and located at 0-0x7FF. The second one starts at 0x8000 and comes in different lengths depending on the particular part. The F28069 2nd RAM partition is 48K and runs from 0x8000-0x13FFF.
    By default, VisSim allocates both stack and heap in the first 2K section to leave the 2nd section free for program variable use. Normally not much heap is used so this is not a problem. If you are using significant heap, which can happen if you are debugging and passing matrices to/from the PC and target, then you can move the heap from the first memory segment to the 2nd by editing the linker command file. Linker command files are located in \vissim80\cg\lib and named \<target>lnk.cmd. For the F28069 it is called F28069lnk.cmd
    To make the change do the following:

    Open the file in notepad and search for .sysmem

    change the current line from:
    .sysmem : > RAMM0M1, PAGE = 1
    to:
    .sysmem : > DRAMH0, PAGE = 1

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by varunkumar on Thu, 03/13/2014 - 16:49.

    Hello Anders,

    I am finding the similar problem. I am using F28035 Piccolo controller what changes should I make in F28035Ink.cmd file?

    Here is the error mentioned below:

    C:\VisSim80\cg>lnk2000 --diag_suppress=16002 -c -x -q -mETccadc10new.map ETccadc 10new.obj -l lib\ii_F280Xsr.lib -heap 512 -stack 512 -o ETccadc10new.out lib \F28035''lnk.cmd 'lib\F28035lnk.cmd', line 118: error: program will not fit into available memory. run placement with alignment/blocking fails for section '.sysmem' size 0x200 page 1. Available memory ranges: RAMM0M1 size: 0x7fc unused: 0x10d max hole: 0x10c error: errors encountered during linking; 'ETccadc10new.out' not built

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Sun, 03/23/2014 - 21:10.

     

    You should make similar changes to that file. In addition you can change the line:

        .ebss            : > RAMM0M1,      PAGE = 1 

    to

        .ebss            : > DRAMH0,      PAGE = 1 

    By using the *Embedded > F280x > Probe...' command, you can find out how much stack and heap you are actually using and lower the amount you request in the Code Gen dialog.