Down the ESP memory lane | DIMI’s place

DIMI's place

My thoughts on different things

9 July 2021

Down the ESP memory lane

While I’ve lost any hope of figuring out why my esp-canary project is failing I was looking for something else to distract myself.

I’ve been trying to figure out, maybe I had some issues with allocating memory in my project or using some wrong compile flags, or were using excessive F() for strings.

Here’s what I had found out:

TLDR

TOOLS to help figure out mem usage:

Platformio

~/.platformio/penv/bin/platformio run -t size
   text    data     bss     dec     hex filename
 833484   14084   33264  880832   d70c0 .pio/build/nodemcuv2/firmware.elf

Xtensa elf-size

That usually comes shipped with platformio:

xtensa-lx106-elf-size firmware.elf 
   text    data     bss     dec     hex filename
 833484   14084   33264  880832   d70c0 firmware.elf

Some cli for memory scan

xtensa-lx106-elf-gdb` firmware.elf
tags: esp8266 - esp32 - flash - ram