cancel
Showing results for 
Search instead for 
Did you mean: 

Post-build step to size object files

jlthompson
Associate III

I'm using STM32CubeIDE Version 2.0.0 and would like to get the size of all the object files in my build. I know I can do this in Project Settings->C/C++ Build->Settings->Build Steps->Post-build steps->commands using arm-non-eabi-size, but what is the variable that expands to the names of the object files, and how do I use it?

4 REPLIES 4
TDK
Super User

> I'm using STM32CubeIDE Version 2.0.0 and would like to get the size of all the object files in my build.

This is available with the default build settings.

After building, go to the Build Analyzer, refresh, then go to the Memory Details tab and you can see the size of each object.

TDK_0-1766252541689.png

 

If you feel a post has answered your question, please click "Accept as Solution".
jlthompson
Associate III

Well, the information is there, but not as useful as I'd like. For my NXP projects, I get a listing, by object file, similar to the summary shown in the Console pane  for the .elf file, which I see the text, data, and bss usage.

I don't think it's broken down by compilation unit (*.o file) anywhere. Objects get removed by the linker so what's in the compilation units is not the same as what's in the final binary. Two object files can contain the same data so you can't just sum them up.

Perhaps you can show a screenshot of what you're looking for.

If you feel a post has answered your question, please click "Accept as Solution".

So this is not , what you want to see ?

AScha3_0-1766255486559.png

 

If you feel a post has answered your question, please click "Accept as Solution".