Skip to content

Instantly share code, notes, and snippets.

@toyowata
Last active February 13, 2022 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toyowata/3152a5f918bf77b2219acfecdfe58a94 to your computer and use it in GitHub Desktop.
Save toyowata/3152a5f918bf77b2219acfecdfe58a94 to your computer and use it in GitHub Desktop.
Usage of esptool.py

Install esptool.py

$ pip3 install esptool
$ esptool.py version
esptool.py v3.2
3.2

Clone ESP8266 firmware

git clone -b v2.1.0 https://github.com/espressif/ESP8266_NONOS_SDK/
cd ESP8266_NONOS_SDK/bin

Download bootloader

https://www.dropbox.com/s/i43cgo0bi89fxbu/boot_v1.6a.bin?dl=0

Flash ESP8266 firmware binaries

  • Connect the module to USB-serial adapter
  • Retrieve serial port
  • Run shell script below
#!/bin/sh
port="/dev/tty.usbserial-DJ00LQLZ"
 
echo "Updating ESP-WROOM-02 Shield ESP8266 firmware (port:" $port ")" 
read -p "Reset with flash mode (IO0 = Low). Press [Enter] key to continue."

esptool.py --port $port --chip esp8266 --baud 115200 write_flash \
0x000000 ./boot_v1.6a.bin \
0x001000 ./at/1024+1024/user1.2048.new.5.bin \
0x1fc000 ./esp_init_data_default_v08.bin \
0xfe000 ./blank.bin \
0x1fe000 ./blank.bin

echo "Update completed."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment