I've recently switched to using Code Warrior. I'm looking at the .map file output, and I'm struggling to interpret some sections of it.
(I'm used to using IAR Embedded Workbench)
I know I'm running close to the limit of my target's code size. So I want to know:
Looking at my .map file I can see it's telling me in the Memory Configuration section how much I've allocated to each area (m_text, m_data), but I already knew that because I can read that from the linker file. What I can't see is how much of each section is actually used.
Is there any documentation explaining the output in the .map file?
Hi Ben,
The linker .map file is indeed hard to read, and actually does not help much :-(.
a) The simplest way to know this is to use the size utility and have the size printed after the link phase. You have several ways. One is to use a post-build command in CodeWarrior:
Printing Code Size Information in Eclipse | MCU on Eclipse
Or use the 'Print size' checkbox, see Code Size Information with gcc for ARM/Kinetis | MCU on Eclipse
See text, data and bss: Code and Data Size Explained | MCU on Eclipse for a description of the format/data. If you want something like this:
Memory region Used Size Region Size %age Used
PROGRAM_FLASH: 40648 B 1 MB 3.88%
SRAM: 25748 B 192 KB 13.10%
Then you need the latest GNU tools.
b) That depends a little with the GNU tools used. CodeWarrior uses older ones, and I think you have to list each file as described in Listing Code and Data Size for each Source File with GNU and Eclipse | MCU on Eclipse . Newer GNU tools as in Kinetis Design Studio accept wild cards.
I hope this helps,
Erich
Thanks - that may be what I'm after