ESP8266 Standalone Module -- Firmware Update
Introduction
The ESP8266 is a $5 Wi-Fi module (in low quantities) that can communicate over UART by AT Commands to the host microcontroller. This page talks about the firmware update process for the ESP8266 module.
The process
To update the firmware on your ESP8266 device, please follow these steps:
- Download the binaries here and use the README to find the appropriate memory locations to flash. For convenience, the appropriate files for 8Mbit flash size are listed below:
esp8266_nonos_sdk_v2.0.0_16_08_10\ESP8266_NONOS_SDK\bin\boot_v1.2.bin
esp8266_nonos_sdk_v2.0.0_16_08_10\ESP8266_NONOS_SDK\bin\at\512+512\user1.1024.new.2.bin
esp8266_nonos_sdk_v2.0.0_16_08_10\ESP8266_NONOS_SDK\bin\esp_init_data_default.bin
esp8266_nonos_sdk_v2.0.0_16_08_10\ESP8266_NONOS_SDK\bin\blank.bin
- Download the flash download tool.
- Compile and load serial passthrough example to the mbed board.
- Put ESP8266 device into firmware update mode (GPIO0 ->GND) (either push button or jumper).
- Load firmware with flash download tool.
- On successful download, put ESP8266 device into boot mode.
mbed board as serial passthrough
Import, compile and load the serial passthrough code onto your mbed board. The serial passthrough code allows the computer to talk directly to the ESP8266 device and receive information from the chip. This is necessary to load the firmware update into the ESP8266 device's memory.
Import programSerialPassthrough
Serial Passthrough program
ESP8266 connection
ESP8266 firmware update wiring
To connect the ESP8266 to the mbed board, make the following connections:
ESP | mbed |
VCC | 3.3V |
GND | GND |
TX | RX |
RX | TX |
ESP8266 into firmware update mode
Standalone module
Wire the ESP8266 device to be in firmware update mode.
ESP | mbed |
GPIO0 | GND |
GPIO2 | 3.3V |
CH_PD | 3.3V |
RST | 3.3V |
Now, you need to reset the chip. Pull down the RST pin to GND for 1 second, and then reconnect it to 3.3V.
For a more detailed diagram, see the getting started guide in the resources section.
Load firmware with flash download tool
Download the flash download tool.
When you've launched the tool, select the ESP8266 downloader.
From the espressif firmware you just downloaded, you need to load 4 separate files to the ESP8266 chip. You need to write the blank binary twice.
Bin | Address |
boot_v1.2.bin | 0x000000 |
user1.1024.new.2.bin | 0x01000 |
esp_init_data_default.bin | 0xFC000 |
blank.bin | 0x7E000 |
blank.bin | 0xFE000 |
Specify the Flash size as 8 Mbit.
Specify the COM port of your mbed board and 115200 baud.
Press START!
Progress bar indicates firmware flashing in progress. FINISH indicates successful flashing.
Note: If the download is stuck at "SYNC" verify baud rate, flash size, binaries in flash download tool. Also make sure mbed board as serial passthrough. Before restarting, make sure to put ESP8266 device in firmware update mode.
Success
Now that you have completed updating the firmware, you need to put the chip in boot mode.
Booting ESP8266
Standalone module
Wire the ESP8266 device for boot mode.
ESP | mbed |
GPIO0 | 3.3V |
GPIO2 | 3.3V |
CH_PD | 3.3V |
RST | 3.3V |
Now, you need to reset the chip. Pull down the RST pin to GND for 1 second, and then reconnect it to 3.3V.
Note: If this doesn't seem to reset the device, simply make the above connections and remove the VCC connection, then make the connection again.
Resources
Here are some other useful resources for ESP8266 shenanigans.
- ESP8266 Getting Started, TRM and so on.
- ESP8266 V2.0 AT command set.
- Minimal ESP Breakout Board to Seeed Grove Headers (some assembly required).
- Full Featured ESP Breakout Board to Seeed Grove Headers (some assembly required).
- Seeed Grove UART Wi-Fi module.
Summary
- Load serial passthrough onto mbed board.
- Hook up the EPS8266 device to the serial port on the mbed board, and put the device into firmware update mode.
- Flash all firmware files according to package instructions. You may need to reset ESP8266 device between each file and put the device into firmware update mode again.
- Go build awesome.
1 comment on ESP8266 Standalone Module -- Firmware Update:
Please log in to post comments.
HI, I'm wondering if the ESP8266 driver from the latest Mbed OS compatible with the Espressif firmware of RTOS version?