Flash ESP32 / ESP8266 chips via esptool-js.
Synopsis
esptool [--port H] [--baud N] <subcommand> [args]
Description
Talks to ESP32/ESP8266 chips over WebSerial for flashing and inspection, mirroring the real esptool.py subcommands. Without --port, opens the browser's serial device picker (requires a user gesture).
Options
chip_id Detect the chip and print its variant + MAC.
read_mac Print the factory MAC address.
flash_id Print manufacturer / device id / detected size.
read_reg <addr> Print a 32-bit register value (hex).
read_flash <addr> <size> <file> Read <size> bytes from <addr> to <file>.
erase_flash Erase the entire flash.
erase_region <addr> <size> Erase a flash region.
write_flash <addr> <file>... Flash firmware at <addr> (addr/file pairs).
run Leave the bootloader and run the app.
--port H Use an existing serial handle from 'serial request'.
--baud N Flash baud rate (default 115200).
--vid 0x.. / --pid 0x.. Picker filter when --port is omitted.
--erase write_flash: erase the whole chip before writing.
Examples
$ esptool chip_id
Open the device picker and identify the connected chip.
$ esptool write_flash 0x0 firmware.bin
Flash firmware.bin at address 0.
Notes
Requires WebSerial support in the browser and a physical device connected via USB. Works together with the serial command for lower-level access.
See Also
serial, usb, hid