Memory Mapping/layout overview from compiled project .map file

yalee104
Posts: 1
Joined: Thu Jul 19, 2018 7:32 am

Memory Mapping/layout overview from compiled project .map file

Postby yalee104 » Thu Jul 19, 2018 7:51 am

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

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Thu Jul 19, 2018 8:11 am

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").

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

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

Postby kolban » Thu Aug 09, 2018 2:34 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 123 guests