Greetings,
I have a problem understanding how the arm-elf-size command works:
When I use 'arm-elf-size -A' I get:
arm-elf-size -B Output/Exe/Bootstrapper.elf text data bss dec hex filename 18068 0 5508 23576 5c18 Output/Exe/Bootstrapper.elf
When I use 'arm-elf-size -B' I get:
arm-elf-size -A Output/Exe/Bootstrapper.elf Output/Exe/Bootstrapper.elf : section size addr .startup 80 1048576 .text 16892 1048656 .data 1096 2097152 .bss 5508 2098248 .debug_abbrev 22956 0 .debug_info 102031 0 .debug_line 19194 0 .debug_frame 9912 0 .debug_loc 44707 0 .debug_pubnames 8590 0 .debug_aranges 4768 0 .debug_ranges 2104 0 .debug_str 17160 0 .comment 1188 0 Total 256186
Question is :
Why does '-A' not show how much .data is used ?
When trying to optimize the code I need to know how much flash-space and how much RAM is used. Using option '-A' I cannot see the .data-sections size so this is useless here. Using option '-B' I can see how much space is used in each segment, but I have to manually calculate the used space as in "Flash = .startup + .text + .data" and "RAM = .data + .bss". The '-B' option is the must usefull one but not very good. Is there a way / tool that can produce an output that simply tells me how much code space and RAM space I have used ???
Cheers RaceMouse
P.S. This is using both GCC-4.1.0 and GCC-4.1.1 P.P.S. This is a crosspost from gnu.gcc.help, but there seems to be a lot more activity here - leading to an increasing the chance for an answer :-)