Documentation
Onboarding
Getting Started
Power & Battery
Hardware & Components
Build & Assembly
Radio & RF Design
Frequencies & Regulations
Firmware & Software
USB & Connectivity
GPS & Navigation
Morse & Communication
Modes & Operation
Field Operations & Rescue
Building Effectively
Build Variants
Project & Reference
Docs Firmware & Software esptool Guide

esptool Guide

Edit on GitHub

The low-level ESP32 flashing tool: when to use it, the key commands, and the recovery procedures PlatformIO cannot do.

esptool Guide

esptool is the low-level tool under every ESP32 flasher. PlatformIO and the Arduino CLI call it for you; knowing it directly is how you recover a bricked board.

Install

CODE
pip install esptool

Or use the copy bundled with PlatformIO (python -m esptool).

The essential commands

CommandPurpose
esptool.py chip_idConfirm the chip and connection
esptool.py --port COM3 flash_idRead the flash chip
esptool.py --port COM3 erase_flashErase everything
esptool.py --port COM3 write_flash 0x0 firmware.binWrite a raw image
esptool.py --port COM3 read_flash 0 1M dump.binBackup the flash

When to use it directly

  • Flash locked or write-protected: esptool reports the chip state clearly.
  • Erase before a clean install: a full erase_flash fixes most post-upgrade corruption.
  • Recovering a board that will not enter flash mode: esptool with the --before default_reset sequence and the chip forced into download mode.
  • Reading a bricked board’s bootloader for diagnosis.

The reset dance

Most ESP32 boards: hold BOOT, press EN, release BOOT. esptool prints:

CODE
Chip is ESP32-D0WD-V3 (revision 3)

when it connects. If it hangs on “Connecting…”, the board is not in download mode.

The partition layout

The beacon uses the default 4 MB layout with the NVS partition the firmware writes (see ESP32 Flash Partitions). When flashing raw, write the bootloader at 0x1000, the partition table at 0x8000, and the app at 0x10000. PlatformIO does this automatically; manual flashing is for recovery only.