esptool
TLDR
Flash firmware
SYNOPSIS
esptool.py [options] command [args]
DESCRIPTION
esptool.py is the official tool for flashing firmware to Espressif chips (ESP8266, ESP32, ESP32-S2, etc.). It communicates over serial to read, write, and verify flash memory.
The tool is essential for ESP32/ESP8266 development, used to upload Arduino sketches, MicroPython, ESPHome, and other firmware. It auto-detects chip type and flash parameters in most cases.
PARAMETERS
--port port
Serial port device.--baud rate
Baud rate (default 115200).--chip name
Target chip: esp8266, esp32, etc.chip_id
Read chip ID.flash_id
Read flash chip ID.read_mac
Read MAC address.write_flash addr file
Write binary to flash at address.read_flash addr size file
Read flash contents.erase_flash
Erase entire flash.erase_region addr size
Erase flash region.verify_flash addr file
Verify flash contents.
CAVEATS
Requires Python and pyserial. Device must be in bootloader mode (GPIO0 low on boot, or auto-reset via RTS/DTR). Write permissions needed for serial port. Incorrect flash may brick device (recoverable via bootloader).
HISTORY
esptool.py was developed by Espressif Systems as the official flashing utility for their ESP8266 and ESP32 series of WiFi/Bluetooth microcontrollers. It's open source and actively maintained as part of the ESP-IDF framework.
SEE ALSO
python(1), platformio(1), arduino-cli(1)


