You may be struggling to find how to flash firmware to ESP8266 module. This article provide you step-by-step instructions on how to successfully flash the NodeMCU firmware to ESP8266 ESP-12E module.
ESP8266 is a compact and cheap WiFi module that provide wireless connectivity to electronic systems. Also it can be used as a small scale microcontroller. This module was developed by Espressif Systems and AI-Thinker of China.
This device consist of over a dozen different models each providing different features and capacities. ESP8266 ESP-12E is one of those models.
In this section we will discuss on how to flash NodeMCU firmware into the ESP8266 ESP-12E module.
Before inserting your code to this device you should install a suitable firmware into the device. Then only this module becomes capable of running a user written code. Follow through the step by step guideline mentioned below to successfully flash the firmware.
Before starting this task make sure you have gathered following items.
ESP8266 ESP-12E Module
CP2102 USB-Serial Converter
A DC 5V 1A power supply
A desktop or laptop computer
A prototype board
Download NodeMCU Flasher Software
NodeMCU Flasher is the software used to download firmware into the ESP8266 module. You can download it from the official github page.
Next you need to download the ESP8266 firmware file. This is what you insert inside the ESP8266 module. There are 2 different languages supported by ESP8266 module called Lua and AT. There are 2 different firmwares for those 2 languages. You should choose one from these two languages and download the firmware related to it. In this article we focus on the Lua language and it’s firmware. The firmware is a bin file. You can get this firmware file from following github page.
In the github page click on releases tab in top of the page. Then scroll down until you see two bin files with names similar to following.
One of these bin files is named as float and the other one is names as integer. If you are doing floating point calculation in your code you should get the float bin file. Or if you are doing integer calculations you should get integer bin file. If you are not concerned about calculations you can download any of those bin files because both are almost same.
Set up ESP8266 Module in Firmware Flash Mode
Now you need to set up your ESP8266 module to firmware flash mode in order to download the firmware file. To do it set up your ESP8266 module as in following circuit diagram.
Important: ESP8266 module operate in 3.3V voltage. Therefore you should be careful to supply only regulated 3.3V voltage to the ESP8266 module.
Flash the Firmware
Now connect the CP2102 USB-to-Serial converter to your computer. Computer will detect the ESP8266 module in one of its COM ports. Go to your computer’s device manager and check which COM port the ESP8266 module was detected on.
Then open NodeMCU Flasher software that was installed in step 1 above. Select the correct COM port from the list of COM ports available.
Now click on Config tab.
Then click on the first gear icon and browse towards the firmware downloaded in Step 2 above. Locate the firmware file, select the file and click on Open.
Finally go to Operation tab and click on Flash button. It will start flashing the firmware to your ESP8266 module. Once completed successfully you will be able to observe a green color tick at bottom left corner of the software.
If any error occurred, go to the Log tab and read logs to find what went wrong.
Congratulations! You have successfully downloaded firmware to your ESP8266 module.
Now you can write your own code and download it into the ESP8266 module.
If you encounter any issue please leave a comment. We might be able to help to resolve your issue.