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.

Help understanding TMS320F28027 Memory Map

Hi All,

 

I'm trying to determine the maximum space I can devote to global variables on the F28027. I'm using Example_2802xFlash as a base.

My problem is that creating an array such as:

char mem[2000];

will result in a compiler error saying:

run placement fails for object ".ebss"

 

I thought that the F28027 had 12K of RAM. From http://focus.ti.com/lit/ds/symlink/tms320f28027.pdf:

0x000000 M0SARAM = 1K x 16

0x000400 M1SARAM = 1K x 16

0x008000 L0SARAM =  4K x 16

0x3F8000 L0SARAM =  4K x 16
The F28027 memory map (F28027.CMD) splits the ram up as such:
...
Page 0:
   PRAML0      : origin = 0x008000, length = 0x000800     /* on-chip RAM block L0 */
...
Page
   RAMM0       : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
   RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
   DRAML0      : origin = 0x008800, length = 0x000800     /* on-chip RAM block L0 */
...
and 
   .stack              : > RAMM0          PAGE = 1
   .ebss               : > DRAML0       PAGE = 1
   .esysmem      : > DRAML0       PAGE = 1
Questions:
1) What is PRAML0 for?
2) Why doesn't this memory map make use of RAMM1?
3) Can one section (eg, .ebss) use two sections of ram (eg, RAMM1 + RAMM0)?
3) How can I maximize my global variable space? I don't mind having a smaller stack, and I'm planning on having most of the program stuff in flash.
4) Is the compiler clever about maximizing the usage of RAM. For example, does char mem[2000] allocate 2000 16-bit slots, or is it clever, and just allocates 1000 16-bit slots?

 

Thanks,

Stewart

  • Stewart:

    The F28027.cmd file is just a suggested memory map - you can rearrange this file however you choose.

    1) PRAML0 is "Program Space L0 RAM" whereas DRAML0 is "Data Space L0 RAM". If you don't need that much program space (i.e. for your code ".text"), you can change it so that: PRAML0: origin = 0x8000, length = 0x400  and DRAML0: origin = 0x8400, length = 0xC00 (in order to increase the size of your DRAML0 for global variable use.).

    2) This is just a suggested memory map. You can use M1 memory if you like. It just so happens there is nothing assigned to RAMM1.

    3) What you can do is make one section BIGGER (i.e. delete RAMM0 and RAMM1, and instead create a section called any name ("RAMM0M1" for instance) starting at 0x50 and of length 0x7B0..

    4) The 28x compiler treats "char" as a 16-bit word, so it allocates 2000 16-bit words..

  • Hello CChang. I am programming my C2000 Launchpad f28027 using SImulink Embedded coder support with CCsv5 make file approach. My problems started when the build failed with the error that the code would not fit into L0RAM. 

    I tried to play around with the Code and data allocations to different memory sections, but that did not work. After further research and advise from posts such as this, I am trying to modify the gel file to edit the memory allocations.

    The memory map in CCsV5 shows that a memory section starting at x9000 to x3dFFFF (cant  remember-pretty big) was alocated as 'NONE'.

    I tried to define L0RAM originating at x9000 with a length of x2000.

    After building the simulink model, when I try to load the program, I get an error from the Breakpoint manager.

    the code text file cant be uploaded to the original L0RAM and I am not sure how to create some extra space for my code.

    Kindly advise asap.

    Thank you in advance.

    Kind Regards