Installing and using ESPtools

Step 1.Install Python (On Windows 10)

Option 1: On Windows 10, you may type โ€œpythonโ€ in the Windows search box beside the Windows Start button and download Python from the Windows App Store.

Option 2: Download the latest version of python from their website: click

Python Install
Python Install

Don’t forget to check the “Add Python X to PATH” this will make using python later on easier.

Step 2.Install Esptool

when the python installation process is is finished open Command Prompt in windows (type cmd in de search bar or Windows key + R and type cmd)

In Command Prompt type:

pip install esptool

the installation will like something like this:

pip install esptool command output
Image: pip install esptool command

if you finished this: ๐ŸŽ‰now we can play around.

Step 3. Poking Around

Make sure your esp32/esp8266 is in programming mode!

For ESP8266:

ESP8266 Boot modes

GPIO 15= LOW
PGIO 0 = LOW
GPIO 2 = HIGH

For ESP32:

ESP32 Boot Modes

Making sure TX and RX are connected the right way. RTFM to find out.
Open your Command line and type the following:

esptool.py flash_id

(It will search on all the COM ports so no need to define that)

ESPtools anwser

Finally we have some more info on the device. Now we know the Flash size: 4MB and we know the COM port that we need.

Lets download the Flash:
Within the command we use the following parameters/settings:
โ€“baud 115200, the baud rate.
โ€“port COM4, the communications port (see previous step).
read_flash, the specific command.
0x0, the starting address of the flash memory to read in hexadecimal.
0x400000, the size of flash memory to read in hexadecimal.
FW.bin, file name of the saved firmware.

for 4MB (32Mbit) flash use:

esptool.py --baud 115200 --port COM4 read_flash 0x0 0x400000 FW.bin

for 1MB (8Mbit) flash use:

esptool.py --baud 115200 --port COM4 read_flash 0x0 0x100000 FW.bin

If you launched the command power cycle the ESP device.

ESP read Flash

Succes! now you have a raw binary of the ESP flash! ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

For more info on the tool : Click

if you want to flash the ESP use the following command:

esptool.py --baud 115200 --port COM4 write_flash 0x0 FW.bin

one of my favorite commands:

espefuse.py --port COM4 summary
E-Fuse ESP32 awnser

2 comments

  1. After intstalling Python 3.12 on WIN10 i get following message:
    >>> pip install esptool
    File “”, line 1
    pip install esptool
    ^^^^^^^
    SyntaxError: invalid syntax
    >>>

Leave a comment

Your email address will not be published. Required fields are marked *