[avr] Displaying memory usage info

Senthil Kumar Selvaraj senthil_kumar.selvaraj@atmel.com
Sat Jul 12 20:10:00 GMT 2014


The AVR target has a patch floating around for the size utility that
calculates sizes in a slightly different manner, and reports memory usage 
in percent terms (the patch hardcodes  available memory per
device).

Previous attempts to upstream the patch weren't successful.
(https://sourceware.org/ml/binutils/2013-01/msg00401.html). I thought
I'd take a stab at implementing it the way Nick suggested. Here's what
I'm planning to do.

1. Embed device memory capabilities in a .note section in the crt file
(no binutils changes, change avr-libc's gcrt1.S).
3. Use objdump's private options feature to add a -Pmem-usage option
that consumes the data in the .note section and then prints out
the usage information, like the patch does now.

Does this look like a reasonable approach. Would you guys have any
problems taking in a patch that implements the above?



More information about the Binutils mailing list