Electronics > Microcontrollers

Estimating Program Size

<< < (5/5)

Renate:
The AVR gcc puts .note.gnu.avr.deviceinfo in the ELF
That lists the AVR model and all the sizes of flash, RAM, EEPROM.
I have my own little program:

--- Code: ---C:\> elfview volume.elf /m
Code:    6798
Data:       0
Zero:    1044

AVR:    atmega32u4
Flash:    6798 /  32768 = 20.7%
RAM:      1044 /   2560 = 40.8%
--- End code ---

SiliconWizard:
One simple thing you can do to get a per-section usage of memory is to pass the '--print-memory-usage' option to the linker (if you're using GCC/binutils).
When invoking the linker through GCC, this can be done with the following option: '-Wl,--print-memory-usage'.

Another way is to use 'size' from binutils on the .elf file:
size xxx.elf

I usually use both in my makefiles.

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod