Page 1 of 1

Memory Mapping/layout overview from compiled project .map file

Posted: Thu Jul 19, 2018 7:51 am
by yalee104
Hi,

Is there a way to get memory mapping/layout overview of compiled esp32 project such as its code size, the size of code that is mapped to SRAM0, static allocated memory in SRAM1/2, and the total available SRAM for heap? I believe the information can be retrieved from the .map file but is there any tool or parser to organize it in a more readable format? thanks

Re: Memory Mapping/layout overview from compiled project .map file

Posted: Thu Jul 19, 2018 8:11 am
by ESP_igrr
The build system provides "make size", "make size-components", "make size-files", "make size-symbols" targets which summarize information from the map file for the project, component, object file, and symbol respectively.

You can get a list of targets available by invoking "help" target (i.e. "make help").

Re: Memory Mapping/layout overview from compiled project .map file

Posted: Thu Aug 09, 2018 2:34 pm
by kolban
To add to Mr ESP_igrr, there are also the bin-utils supplied by the GCC toolchain.

https://www.gnu.org/software/binutils/

Specifically,

* xtensa-esp32-elf-objdump
* xtensa-esp32-elf-nm
* xtensa-esp32-elf-nm-readelf

These commands have a wealth of options and formats and can give any and all data (in one form or another) that may ever be needed. These commands may also be included in scripts and other tools for interpretation of their output and for generating reports. If I were to guess, these would be the commands be executed under the covers from the make tools.