Memory Usage analyze form .map file

Hello everyone,

I'm currently working on memory usage analysis. While reviewing the .map file generated by Keil, I came across the following section:

 ,

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!

Parents Reply Children
  • 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!

  • 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.