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 6.1.1 map file Memory configuration used size mismatch with Actual bin file size

Other Parts Discussed in Thread: AM3352

Hi,

We are developing Application for AM3352 based target board using TI CCS 6..1.1 . When we build our application the map file Memory configuration sections shows the used memory size as follows.

******************************************************************************
TI ARM Linker PC v5.2.5
******************************************************************************
>> Linked Wed Jun 01 18:11:23 2016

OUTPUT FILE NAME: <CCR-CTRL-V2.out>
ENTRY POINT SYMBOL: "Entry" address: 80000000


MEMORY CONFIGURATION

name            origin         length    used      unused      attr fill
---------------------- -------- --------- -------- -------- ---- --------
DDR_MEM 80000000   07ffffff    00035474   07fcab8b     RWIX


SEGMENT ALLOCATION MAP

run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
80000000 80000000 0002beb8 0002beb8 r-x
80000000 80000000 000000d0 000000d0 r-x .text:Entry
800000d0 800000d0 00029930 00029930 r-x .text
80029a00 80029a00 00002322 00002322 r-- .const
8002bd28 8002bd28 00000190 00000190 r-- .cinit
8002c000 8002c000 000095c0 00000000 rw-
8002c000 8002c000 00006b50 00000000 rw- .bss
80032b50 80032b50 00000a6a 00000000 rw- .data
800335c0 800335c0 00002000 00000000 rw- .sysmem
87fffff0 87fffff0 00000008 00000000 rw-
87fffff0 87fffff0 00000008 00000000 rw- .stack

So the used memory as per the map file is 0x00035474, which comes out to 218KB of size, where as the actual bin file size is just 179Not sure how there can be mismatch between the actual bin file size and the data shown in map file?

Please suggest

  • Just a correction, the Actual binary file size is 179KB as opposed to map file used memory size shown as 218KB. Not sure how this can happen.
  • sram said:
    Just a correction, the Actual binary file size is 179KB as opposed to map file used memory size shown as 218KB.

    The binary file covers the extent of the initialized sections. The map file shows that the length of the initialized sections is 179,896 (0x2beb8) bytes which matches the size of the binary file:

    run origin load origin length init length attrs members
    ---------- ----------- ---------- ----------- ----- -------
    80000000 80000000 0002beb8 0002beb8 r-x
    80000000 80000000 000000d0 000000d0 r-x .text:Entry
    800000d0 800000d0 00029930 00029930 r-x .text
    80029a00 80029a00 00002322 00002322 r-- .const
    8002bd28 8002bd28 00000190 00000190 r-- .cinit

  • I confirm the answer from Mr. Gillon is correct.  But I can add more detail.  The length of a binary file is the number of bytes from the lowest address used by an initialized section to the highest address used by an initialized section.  This is why you usually put all the initialized sections together.  Any holes in that range cause the binary file to be bigger.

    Thanks and regards,

    -George

  • Thanks for the inputs.