Skip to content

Wrong RAM/flash usage reported by Mbed CLI #998

@swapnilsayansaha

Description

@swapnilsayansaha

Sample resource usage of program compiled “claimed” by GCC_ARM via Mbed CLI for STM32F746ZG NUCLEO board:

image

Sample resource usage of program compiled “claimed” by ARM compiler via Mbed Studio for the same program and same hardware:
image

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
ARMmbed/mbed-os#12541

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions