Program with esptool

Program over USB-to-Serial

Connect to your ESP chip with a USB serial converter, perhaps it's even built-in depending on the board.

Burning the AT Command Firmware with esptool

This section assumes you know how to use 'esptool' to upload firmware to your ESP! If you're not sure, check https://github.com/espressif/esptool and look for tutorials

(Download and uzip the ESP8266 AT Firmware zip file. There will be a folder called esp8266/ containing 3 files.

Put the board into bootload mode (if you have to) by pulling GPIO 0 down to ground while resetting. Use the esptool command line to upload the firmware, for example (your serial port name may vary). 

esptool.py --chip esp8266 -p /dev/ttyUSB0 write_flash 0 esp8266/AT_firmware_1.6.2.0.bin 0x3fc000 esp8266/esp_init_data_default_v05.bin 0x3fe000 esp8266/blank.bin

or

esptool --chip esp8266 -p COM6 write_flash 0 esp8266/AT_firmware_1.6.2.0.bin 0x3fc000 esp8266/esp_init_data_default_v05.bin 0x3fe000 esp8266/blank.bin

Programming ESP32 SPI Firmware with esptool

The SPI Firmware is much simpler, we use the combine.py file to turn it into one ~1MB file. You can program this into your ESP32 with:

esptool.py --port /dev/ttyS6 --baud 115200 write_flash 0 NINA_W102.bin

or

esptool.py --port COM5 --baud 115200 write_flash 0 NINA_W102.bin

Change the name of the binary file to match, and the serial port of your USB-serial adapter or Huzzah32 UART connection.

Checking AT Command or SPI Debug Output

Once you upload the firmware, use the same serial connection you used for uploading to see that the firmware 'took' and some status/debug information:

You can connect with a terminal over the USB-Serial connection. Use 115200 baud.

Hit the reset button to see the debug output.

 

If you have the AT command firmware installed, when you type, characters will be echo'd. You can try typing AT to get an AT OK reply  Make sure your terminal software sends new-lines and carriage returns when you hit return or send data. They are required.

This guide was first published on Dec 16, 2018. It was last updated on Dec 16, 2018. This page (Program with esptool) was last updated on Sep 19, 2019.