ARMmbed / ARMmbed/mbed-cli

Wrong RAM/flash usage reported by Mbed CLI

Open
#998 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
339
Forks
187
PR merge metrics
No merged PRs in 30d

Description

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

![image](https://user-images.githubusercontent.com/20337475/142909763-b292ffdc-6720-49ad-8180-1e8a2aa08239.png)

Sample resource usage of program compiled “claimed” by ARM compiler via Mbed Studio for the same program and same hardware:
![image](https://user-images.githubusercontent.com/20337475/142909803-5599e342-4f97-4476-bc32-9e49eb3dc9e6.png)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.