Skip to content

Conversation

grahamroff-dev
Copy link

The current size_report generates "ram" and "rom" reports, but not one showing the total of all run-time memory used (the "ram" report does not include memory required to load the code for non-XIP boards). Summing the existing reports does not work as it double-counts statically initialized data.
The new "all" report shows the correct accounting of all run-time memory used.
To support this functionality the "targets" argument has been extended to allow multiple arguments, for example to generate all three reports: $ size_report -k ... -z ... --output=. ram rom all

In the JSON output, the location ("ram" or "rom") is included in the "loc" property for each symbol.

The current size_report generates "ram" and "rom" reports, but not one
showing the total of all run-time memory used (the "ram" report does not
include memory required to load the code for non-XIP boards).
Summing the existing reports does not work as it double-counts
statically initialized data.
The new "all" report shows the correct accounting of all run-time memory
used.
To support this functionality the "targets" argument has been extended
to allow multiple arguments, for example to generate all three reports:
$ size_report -k ... -z ... --output=. ram rom all

In the JSON output, the location ("ram" or "rom") is included in the
"loc" property for each symbol.

Signed-off-by: Graham Roff <[email protected]>
Copy link

github-actions bot commented Oct 7, 2025

Hello @grahamroff-dev, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Copy link
Contributor

@mbolivar mbolivar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave this a go and its output makes sense to me. Example: https://gist.github.com/mbolivar/2ad8f47d115db8be42dc51af2a0e53b3

@JarmouniA JarmouniA self-requested a review October 7, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants