I spent a few hours today trying to figure out how to account for everything that gets stored in RAM for a given firmware sketch, but I have been unsuccessful getting any of the numbers reported by different tools to agree.
I’ve compared the number reported as “Data” when building the sketch to the numbers I get from
make size-map, and also @noseglasses’
elf_diff program, but I no matter how I sum the different amounts, I can’t get any two of those tools to give me the same results.
I feel like the size map output (from
avr-nm) ought to be giving me the information I need to identify the source of each byte of RAM used, but I’m unable to make sense of it, and find myself doubting all these numbers because I can’t reconcile them with each other.
I’ve searched for a resource to help understand the output of these kinds of tools better, but I haven’t found anything helpful yet. Can anyone here point me at an introductory tutorial on this topic?