Sample resource usage of program compiled “claimed” by GCC_ARM via Mbed CLI for STM32F746ZG NUCLEO board:
Sample resource usage of program compiled “claimed” by ARM compiler via Mbed Studio for the same program and same hardware:
Why is the output different? GCC_ARM completely ignores the contribution coming from model.o and also underreports the overall flash and RAM contributions of each component. Note that the program runs fine in both cases on the target hardware. This is important for me because I need to profile how much flash and RAM a tensorflow lite micro model consumes. I tried using ARM compiler with CLI but it wants license.
Sample resource usage of program compiled “claimed” by GCC_ARM via Mbed CLI for STM32F746ZG NUCLEO board:
Sample resource usage of program compiled “claimed” by ARM compiler via Mbed Studio for the same program and same hardware:
Why is the output different? GCC_ARM completely ignores the contribution coming from model.o and also underreports the overall flash and RAM contributions of each component. Note that the program runs fine in both cases on the target hardware. This is important for me because I need to profile how much flash and RAM a tensorflow lite micro model consumes. I tried using ARM compiler with CLI but it wants license.
It seems like a well-known issue: https://forums.mbed.com/t/code-size-reporting-does-not-take-into-account-rodata/15269 https://github.com/ARMmbed/mbed-os/issues/12541