I DNT Know
I DNT Know
I DNT Know
P R O J E C T S | T U T O R I A L S | C O
YOU ARE HERE: HOME / ESP8266 / HOW TO UPDATE FLASH ESP8266 FIRMWARE – FLASHING OFFICIAL AT FIRMWARE
This is the second project on ESP8266 and in this project, I’ll show you how to flash the Official
Espressif Firmware in ESP8266 using Arduino. This project can also be used if you want to
update to the latest ESP8266 Firmware.
In the previous ESP8266 Project, we have seen how to write our own program in ESP8266
using Arduino IDE and control an LED using the GPIO Pins. In the same project, I’ve mentioned
that by default, the ESP8266 ESP-01 Module comes with an AT Command Firmware.
But if we write our own program to access the GPIO Pins (like we did in the previous project),
the existing firmware will be completely erased and the new program will be written.
Even though ESP8266 WiFi Module is manufactured by Espressif Systems, the SoC is used by
many third party manufacturers to implement their own custom modules. In my case, I have
the ESP8266 ESP-01 Module by AI-Thinker.
This leads to a lot of questions like whether the firmware is original or not, is the firmware up to
date or not and many other.
So, in this project, we will flash the official Espressif Systems’ firmware for ESP8266 Module
using the official ESP8266 Flasher Tool provided by Espressif Systems which is the ESP8266
FLASH DOWNLOAD TOOL and Arduino UNO as the USB to Serial Interface.
The ESP8266 Firmware can be installed for two reasons: If you want to update the ESP8266
Firmware to its latest version or to completely install the new firmware (in case it was
overwritten by any program). So, let’s get started.
Table of Contents
1. Hardware Setup for ESP8266 Firmware Update
2. Circuit Diagram for Flashing the Firmware to ESP8266
3. Components Required
4. Checking the Current Firmware Version
5. Downloading the Latest ESP8266 Firmware
6. Downloading the ESP8266 Flash Download Tool
7. Installing the Firmware in ESP8266
If you remember in the GETTING STARTED WITH ESP8266 AND ARDUINO project, I’ve
mentioned that GPIO0 and RST Pins of the ESP8266 Module play an important role in
configuring it in Download Mode.
We will implement the same setup here as well. So, the connections are as follows.
VCC to 3.3V
GND to GND
TX to TX of Arduino UNO
RX to RX of Arduino UNO (through level converter)
GPIO0 to GND
RST to GND through Push Button
CH_PD to 3.3V
Components Required
Arduino UNO
ESP8266 ESP-01 (any ESP8266 Module)
1 KΩ Resistor
2.2 KΩ Resistor
Push Button
SPDT Switch
Connecting Wires
Mini Breadboard
IMPORTANT NOTES
Before proceeding further, please refer the previous project for configuring Arduino IDE
and getting the Arduino UNO ready for flashing the firmware.
I’ve connected the GPIO0 Pin to GND directly. And after flashing the Firmware, I’ve
disconnected it from GND. You can use a SPDT switch to achieve this action i.e. in one
position, the GPIO0 is connected to GND and in the other position, it is free to use as a
GPIO.
ESP8266 can’t tolerate 5V. It must be connected to 3.3V. Even the RX Pin of ESP8266 is
connected through a level converter.
After making the connections as per the circuit diagram given above (and disconnecting the
GPIO0 from GND), plug-in the USB Cable of Arduino to the Computer and Open any Serial
Monitor Software. I am using the Arduino’s Serial Monitor. You can use any software like Putty,
Terminal, etc.
In Arduino IDE, select the correct COM Port and open the Serial Monitor. Set the baud rate to
115200 and select Both NL and CR option in the serial monitor. After this press the RST Button
of the ESP8266 for a second and release. The ESP8266 Module will reset and display “ready”
after some garbage data on the serial monitor.
In order to check for the firmware version, you need to type the following AT Command and
hit send. This command will return the firmware version of the ESP8266 Module. All the AT
Commands should be in Upper Case.
AT+GMR
I will now replace this firmware with the Espressif Firmware (the manufacturer of ESP8266
SoC).
NOTE: Make sure that GPIO0 Pin connected to GND before proceeding further.
I’ll be using the Non-OS SDK (well, technically, the Firmware files based on the Non-OS SDK).
The ESP8266 Firmware files are in the form of Binary Files i.e. .bin files.
Now since I will be using only the AT Command Set of the ESP8266, I will download only the
Bin Files associated with the AT Commands. In order to download the AT Commands
Firmware for ESP8266, visit the official link here or directly download from this link.
There are other firmware versions for ESP8266 Module. Try the procedure mentioned in this
project first and if you succeed, you can try installing other ESP8266 Firmware. Other firmware
can be downloaded from the SDK section in the link mentioned above.
In order to download the ESP8266 Firmware Flash Download Tool, visit this link and in the
Tools section, download the ESP Flash Download Tools or you can directly download from
this link.
Now that we have downloaded the Firmware and the Flasher Tool for ESP8266, we will
proceed with installing the Firmware in ESP8266.
You will then get various options like ESP8266 Download Tool, ESP8285 Download Tool,
ESP32 Download Tool and ESP32D2WD Download Tool. Select the ESP8266 Download Tool.
After opening the ESP8266 Flash Download Tool, you need to select the firmware files that we
need to install. You need to upload four files at four different addresses. The following table
will give you the list of files and their corresponding addresses.
NOTE: This list is for Firmware over the Air (FOTA) Flash Memory Mapping for ESP8266
Modules with 1MB of Flash. For other flash sizes, please refer to the ESP8266 Getting Started
Guide, from this link.
boot_v1.7.bin 0x00000
user1.1024.new.2.bin 0x10000
esp_init_data_default.bin 0xFC000
blank.bin 0xFE000
In the ESP8266 Download Tool, in the SPI Download Tab, select the necessary files in the
“Download Path Config” option by click on the (…) button. Also, add the corresponding
addresses in the space provided.
After selecting the four files and filling in the Addresses, set the crystal frequency to 26MHz (it
is usually 26MHz but in case your ESP8266 board has a different crystal, enter that value).
Next select the flash size. Since I have a 1MB flash on-board, I have selected the 8Mbit (which
is equal to 1MB) flash size option.
Finally, select the correct COM Port and set the baud rate to 115200. Make sure that all the
serial terminal are closed.
Before starting the flashing, check that GPIO0 is connected to GND and give a pulse LOW
(push the Reset button) on the RST pin.
Now click on START button. The flashing of the firmware in ESP8266 should begin. If you
notice in the ESP8266 Firmware Flash Tool, the moment you click on START, you will get two
MAC Address as AP and STA and also information about the Module in the DETECTED INFO
section.
If everything goes well, the ESP8266 Module must be updated with new firmware. If there is
any error, disconnect the USB cable, connect it once again, and after clicking on START, push
the Reset button of the ESP8266.
You will get a FINISH message on the Tool and you can close the tool after this. Disconnect
the GPIO0 from GND and reset the device. Open the serial monitor of Arduino once again and
check for new firmware.
In order to check the firmware version, type AT+GMR and hit send. You will get a response
with the AT Version number and the SDK Version number. In my case, the new AT Command
Set Version is 1.5.0.0 and the SDK Version is 2.1.0.
In this project, you have seen how to update/flash firmware in ESP8266 Module using the
official Espressif ESP8266 Firmware.
FILED UNDER: ESP8266, GENERAL
Comments
srm says
February 13, 2018 at 8:44 am
Hi ! I did follow the procedure and saw successful FINISH at the end. However after
disconnecting GPIo and resetting the device, it gave some junk characters and was saying
Wait for WIFI……….and goes on with dots ? It does not respond to AT calls from Serial Monitor
(arduino). Please suggest….
Reply
Nico says
April 10, 2018 at 1:15 pm
seem to be unable to do this. Downloading goes perfect but when I reset the ESP12 it says:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
error magic!
backup boot failed.
Ravi says
May 14, 2018 at 12:33 am
No. ESP-12 is also based on ESP8266EX SoC but with additional features like more
GPIO Pins, ADC, SPI, I2C etc. I am not sure what is going on here.
Reply
Ricardo says
July 27, 2018 at 10:57 pm
I had the exact same problem. Then I realized that the check boxes next to the
“path” were unticked. Effectively saying “I don’t want to flash any of these files to
the esp8266.” Tick the file selection boxes and all worked well.
Reply
Reply
Joslyn says
June 10, 2018 at 10:15 pm
Thanjs for the info. However, after following your steps carefully I keep getting this error.
ESP8266 Chip sync error esp_sync_blocking. Can you help please
Reply
Ravi says
June 18, 2018 at 11:19 pm
I think it is related to baud rate. Try setting up the correct baud rate.
Reply
I followed this exact procedure twice, 1st time was trying to use v 1..6.2 firmware. I’m a little
nervous about the load addresses??? This effectively bricked the first unit.
I tried again, reading and following every step exactly but this time using the same v 1.5.1
firmware.
And I got the same results… another bricked unit!
Both units send output, the bit’s are scoped at 12.3uSec, which is about 80,000 baud (not a
standard baud rate) My guess? There is something corrupt in the firmware or the load
addresses are wrong?
Can you please tell me how you found those load addresses?
Reply
Ravi says
June 24, 2018 at 11:56 pm
I have been using the same addresses since I have posted it here and had no
problems what so ever. I even upgraded my ESP-01 to the newer firmware (V1.6.2) few
days back using the same procedure.
These addresses are provided in the official data sheet of ESP8266EX SoC (which can
be downloaded from the Espressif website) and also few github pages.
May I know what module are you using? Also, does it come with 5V to 3.3V level
converters (for RX of ESP8266)? What about the power supply to the module (only
3.3V).
Reply
Scott says
July 3, 2018 at 2:01 pm
There is a problem with the ESP8266 download tool. I did not explore what version it
starts in, but under 3.6.4 the SPIDownload tab will not flash correctly and you’ll see
jibberish when trying to use AT interface.
Simple fix, use the MultiDownload tab, widen the window and just set and load a
single module. It will load and behave correctly. This is not a problem with the above
directions, the hardware or the firmware (1.6.2) it is a problem with the Download Tool.
Reply
jj says
August 7, 2018 at 8:11 pm
What should it do ?
Reply
Khaik Keong Lim says
September 7, 2018 at 8:02 pm
I have used the procedure to update the firmware on my ESP-01 module without success.
Despite checking everything, when I start the flashing process everything hangs up and
there is no indicator that the flashing process is going on. I am at a loss what to do now and
wonder if anyone can offer suggestions.
Reply
jmcunha says
November 9, 2018 at 9:35 pm
Hello. I also have problem trying to flash load. where appear something like : ESP8266 Chip
efuse check error esp_check_mac_and_efuse. Whats is this and how can I solve.?
Thanks.
Reply
I hope this post will help someone with problems flashing the ESP modules: I had multiple
unsuccessful attempts at flashing these units. It is somewhat of a nightmare.
Before upgrading to a new SDK version, I downgrade my ESP module to an older version
using this tool:
https://github.com/Stadslab/ESP8266_example/tree/master/ESP8266_flasher_V00170901_00_Cloud%20Update%20Read
Once the flasher tool updates the module with the older version, I then use the Espressif
tools (together with the stated procedure) to upgrade to the latest SDK version. This seems
to work for me. I can not offer any technical explanation why it would work, but it does.
Hope it helps.
Reply
Leave a Reply
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
POST COMMENT
PROJECTS BY CATEGORY
KITS
GENERAL
Tutorials
Symbols
Courses
Calculator
Contact
HomeZene
PROJECTS
Electrical
Electronics
Embedded
Power
Robotics
ARM
IOT
PROJECTS
Mini projects
Microcontroller
Arduino
Solar
Free circuits
Home Automation
Seminar Topics
Electronics Questions
TUTORIALS
Capacitors
Resistors
Filters
Diodes
Transistors
TUTORIALS
Amplifiers
IO Devices
Thyristors
DC Circuits
Number System
TS EAMCET 2019
FOLLOW US
Instagram
Youtube
Facebook
Google Plus