esp32 esp8266 expressif microcontrollers

ESP32 / ESP8266

TTGO ESP32 LORA 0.96 OLED microcontroller “Paxcounter” ships with firmware pre-installed. Existing flash image can be backed up using ( ), an open source python utility for managing ROM bootloader in Espressif ESP8266 & ESP32 chips.

Install & setup

$ git clone
$ cd esptool
$ pip install --user -e .

ESPTOOL “flash_id” provides info on chip hardware:

python ../esptool/ --port /dev/ttyUSB0 flash_id v3.0-dev
Serial port /dev/ttyUSB0
Detecting chip type... ESP32
Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, Coding Scheme None
Crystal is 40MHz
MAC: 50:02:91:8c:16:e0
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4016
Detected flash size: 4MB

To read (backup) existing ESP 4mb flash image:

stevee@ideapad-530S:~/esp/ttgo-esp-lora32$ python ../esptool/ -b 115200 --port /dev/ttyUSB0

read_flash 0x00000 0x400000 flash_4M.bin v3.0-dev
Serial port /dev/ttyUSB0
Uploading stub...
Running stub...
Stub running...
4194304 (100 %)
4194304 (100 %)
Read 4194304 bytes at 0x0 in 377.5 seconds (88.9 kbit/s)...
Hard resetting via RTS pin...

Flash image can be restored with:

python -b 115200 --port /dev/ttyUSB0  write_flash --flash_freq 80m 0x000000 flash_4M.bin