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.

TMS320F28034: Map file variable size confusion

Part Number: TMS320F28034

Hello, 

I am working with Matlab 2016b with the  Embedded Code Support package for TI C2000 Processors, v16.2.6.

We use this environment to build Simulink model code into auto-generated c code that then gets build into the .map .a2l .out and .hex files we use. 

The code is compiled by the TI compiler for the CCS5 toolchain.

My question is regarding the change in size of one of my static variables in the map file.

In the attached SW_11340_1_withBuffer.h, you can find the structure D_Work_SW_11340_1, which has a Uint32 Buffer[300] on line 375.   This buffer has been removed from the project, as seen in SW_11340_1_noBuffer.h.

However, the map file shows the variable SW_11340_1_DWork ( the only instance of this structure)  has a size of 0x231 in SW_11340_1_withBuffer.map (line 1019), and of  0x21e in SW_11340_1_noBuffer.map (line 1016). 

This size difference is only 19 uint16 spaces, if I am understanding my map file correctly. 

Why does removing the 302 Uint32s from the sturcture (Buffer, Index, and Buffer_Sum) not change the structure size in the map file by this much? If the space for SW_11340_1_DWork in the map file does not contain the buffer element, where is the buffer element reserved and how do I determine this?

Please note that this buffer removal (and the simple function around the buffer) should be the only difference capture between these two map files.

Thank you for any assistance in understanding how the map file works,

Neal

0143.SW_11340_1_withBuffer.h

5658.SW_11340_1_noBuffer.h

SW_11340_1_withBuffer.map.txt

SW_11340_1_noBuffer.map.txt

  • As noted at the top of that column, 231 and 21e are the data pages, not the memory size. The C28x uses a 6-bit data page pointer for direct addressing and the .map file is reporting what that value is for "SW_11340_1_DWork". To find the memory size you need to look at the make up of the ".ebss section:

    With buffer:
    00008000 0000118a SW_11340_1.obj (.ebss)

    Without buffer:
    00008000 00000f2a SW_11340_1.obj (.ebss)

    0x118a - 0xf2a = 0x260 = 608

    I would have expected 604 16-bit words (i.e. 302 32-bit vars.). Are you removing two other variables somewhere?

    Regards,

    Richard
  • Thank you for pointing out my mistake. Those numbers make more sense.
    After looking around, I have found one more uint32 that gets removed from SW_11340_1.obj.
    I am still missing what the remaining two uint16s spaces are from, though they are probably from some local globals in a file I haven't searched yet.
    Thank you for the assistance,
    Neal