Windows: Installing and Testing "esptool" Utility
Contents
Getting Started
This article describes how to install and test the esptool tool on Windows. This utility provides an easy to use method for installing and updating MicroPython on ESP32 based microcontroller boards.
This article; Linux: Installing and Testing "esptool" Utility describes the Linux install.
ESP32 development boards typically come with the Arduino bootloader or no firmware at all. Most ESP8266 modules, such as the ESP-01 or NodeMCU, are typically shipped with Espressif's AT command firmware or a manufacturer-specific version. This allows the module to function as a Wi-Fi serial bridge out of the box.
The esptool tool is a Python-based, open-source, platform-independent utility used to flash, erase, read, and manage firmware on Espressif ESP32 and ESP8266 microcontrollers.
It communicates with the ROM bootloader to perform low-level operations such as:
- Flashing firmware: Writing .bin files to the chip's flash memory. This is how MicroPython firmware is flashed to ESP32 and ESP8266 microcontroller.
- Erasing flash: Clearing all or part of the flash memory.
- Reading flash: Backing up existing firmware or memory contents.
- Querying chip information: Retrieving chip type, MAC address, flash size, and more.
For anyone working with ESP32 and ESP8266 microcontrollers this is an essential tool to have installed on the computer.
Installing the esptool Utility on Windows
- Is Python installed?: In a Command Prompt enter the following:
- Python --version
- Python 3.13.7
- Is esptool is already installed? Enter the following into the Command Prompt:
- python -m esptool version
- Install esptool: Enter the following into the Command Prompt:
- pip install esptool
- Verify the install:
- esptool version
- esptool v5.2.0
Testing the esptool Utility
The following ESP32 chips have native USB support:
- ESP32-S2
- ESP32-S3
- ESP32-C6
The remainder of the ESP32 family require an external chip to supply USB support. The most common support chips found on development boards are:
- CP2102 / CP2104 (Silicon Labs)
- CH340G / CH343P (WCH)
- FT23RL (FTDI)
Windows 11 has driver support for all three of these options.
The esptool tool will generally automatically detect any ESP32 that is plugged into a computer USB port. On the very odd occasion that the ESP32 is not detected it can be manually put into flash mode:
- Hold down the BOOT (or GPIO0) button.
- Press and release the EN (or RESET) button.
- Release the BOOT button.
- After flashing, reset the board.
We tested our installation with a WeAct Studio ESP32-DOWD-V3 board with 8MB of external SPI flash. It has a CH343P chip that provides USB support.
Window 11 automatically installed the correct driver when the board was plugged into a USB port on the laptop. It appeared in Device Manager as COM4.
Run the following command in a Command Prompt (Terminal):
esptool flash-id
esptool v5.2.0
Connected to ESP32 on COM4:
Chip type: ESP32-D0WD-V3 (revision v3.1)
Features: Wi-Fi, BT, Dual Core + LP Core,
240MHz, Vref calibration in eFuse,
Coding Scheme None
Crystal frequency: 40MHz
MAC: 4c:c3:82:06:4a:d8
Stub flasher running.
Flash Memory Information:
=========================
Manufacturer: ef
Device: 4017
Detected flash size: 8MB
Flash voltage set by a strapping pin: 3.3V
Hard resetting via RTS pin...
This is the result of running it under Windows where it identified the ESP32 on COM4. Note the following about the manufacturer and device ID:
- Manufacturer: ef — This corresponds to Winbond, a common manufacturer of flash memory chips used in ESP8266 and ESP32 modules.
- Device: 4017 — This is the device ID for a 64 Mbit (8 MB) flash chip, typically operating in quad I/O mode.
Checking for esptool Utility Updates
It's a good idea to periodically check for esptool updates. New versions may provide extra functionality to support new ESP32 chips, make the tool easier to use and most importantly, fix bugs.
Enter the following into a Terminal:
- pip install --upgrade esptool
Any update available will be installed.
Microcontroller Bits and Pieces
Tools for Microcontrollers
dfu-util Utility
esptool Utility