Hello everyone,
I'm currently working on memory usage analysis. While reviewing the .map file generated by Keil, I came across the following section:
.map
,
I'm wondering if this information can be used to determine ROM and RAM usage.
P.S. I couldn't find any official documentation explaining this part of the .map file (generated by the linker). It would be great if anyone has insights or documentation to share!
Nhut Ho said:I'm wondering if this information can be used to determine ROM and RAM usage.
Yes, this is the summary of the memory areas that are in use by your application.
Nhut Ho said:I couldn't find any official documentation explaining this part of the .map file (generated by the linker). It would be great if anyone has insights or documentation to share!
This is described in the linker manual. Please see:
https://developer.arm.com/documentation/dui0474/m/getting-image-details/example-of-using-the---info-linker-option?lang=en
Hi Hans Scheneebauer,
Thanks for helping me!
I’m still a bit confused about some information in the example:
Is ROM usage equal to the Total ROM Size (Code + RO Data + RW Data), which is 25,960 bytes (25.35 kB)?
For RAM usage, is it just the RW size? Or is it RO + SW size?
I really appreciate your help — you saved my day!
Related:
"Determining the stack usage of applications"
https://developer.arm.com/documentation/kan316/latest/
The totals shown are explained in the last three rows of the report.
ROM usage - or memory needed to store the application is the total of all the code, and data with initial values (ie RO Data and RW Data). Typically this is how much Flash memory is needed.
RAM usage - or memory needed to store data, is the RW size. This is the minimum RAM needed, but you will likely need more. This report does not take into account Stack and Heap usage (see my colleague's message for further info), nor does it take into account if you copy any code from "ROM" to "RAM" as part of scatterloading.
Hence "Total ROM size", but not "Total RAM size" is listed.
Thank you, I really appreciate it