2025-12-20 9:13 AM
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?
2025-12-20 9:43 AM
> 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.
2025-12-20 9:53 AM
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.
2025-12-20 10:32 AM
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.
2025-12-20 10:36 AM
So this is not , what you want to see ?