size of *.elf file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

size of *.elf file

532 Views
roymessinger
Contributor V

How do I know if the size of my code to flash will be sufficient for my SRAM size of the controller?

Where can I look for the my code flash size?

0 Kudos
3 Replies

374 Views
BlackNight
NXP Employee
NXP Employee

Hi Roy,

that depends on the toolchain used. I assume you are using gcc and Kinetis Design Studio, then you can turn on the size informatio:

pastedImage_4.png

See Code Size Information with gcc for ARM/Kinetis | MCU on Eclipse  for details about this.

This will report you the size in the console view after linking. This is usin the 'size' utility (see that post) which gives you all kind of information.

text, data and bss: Code and Data Size Explained | MCU on Eclipse  explains the meaning of the information printed.

Another way would be to look at the linker .map file.

I hope this helps,

Erich

0 Kudos

374 Views
roymessinger
Contributor V

Ok, thank you.

Where do I look at the .map file?

I've tried looking there but it's a very large file...

Roy

0 Kudos

374 Views
BlackNight
NXP Employee
NXP Employee

Hi Roy,

yes, that's correct, there is no single place in the GNU Linker map file to look at. You get all the details, but no summary. You need to use the size tool as outlined by these articles if you want a summary.

Erich

0 Kudos