ESP8266 Build and flash the firmware is very easy job. before that you need to choose the correct esp8266 platform (Arduino Core, AT Command, NodeMCU, Mangoes OS, Micro-python) for your requirement. At first you should know, what is esp8266 firmware? esp8266 Firmware contains a collection of library files or binary files. Why need to flash Firmware into esp8266? like when we think, we can’t able to write all code our self. so we will follow some open source. if you use open source you need to flash the selected open source library file into esp8266 before start your application.
if you select AT commands, NodeMCU, Mongoose, and ESPressif methods you need flash the firmware before. In Arduino method you don’t need to flash the firmware first. when upload the arduino compiler build the firmware with our application code as bin file. Flashing the firmware to esp8266 is very easy and simple.
Previous section we discussed about what is ESP8266?, What are the different kind of esp8266 boards available in the market? what are the different way to program the esp8266? and different type of programmers available for ESP8266? if you not read that please see here :
- 1 ESP8266 Build the Firmware
- 2 ESP8266 Flash the Firmware
- 3 ESP8266 Next Topic
ESP8266 Build the Firmware
Building the firmware for ESP8266 is also simple. but you choose your platform first. that means which method you choose for your application. if you are a beginner most preferred method is NodeMCU Lua method. last section you will seen the what are the different way of programming methods in esp8266. if you not seen that previous section you can’t able to understand below discussion. here below some discussion about how to build the firmware for all the programming methods of esp8266.
Ardiuno Core Firmware
You don’t need to build the firmware for Arduino core methods. because in this method firmware also will upload with our application code based on your application with library files. when your code is complied that time required library added with the help of compiler.
AT Command Firmware
When you buy new ESP8266 chip its comes with AT firmware mostly. But afterwards we may use some other programming methods for our requirement. AT firmware has limitations like few AT commands and can’t develop more features, also if you use esp8266 with AT command you need another micro-controller to drive the esp8266 via AT commands. All vendor and manufacture providing AT commands firmware. But best recommend to use ESPressif AT firmware. download from this below link. ESPressif AT Firmware. (Recommended)
NodeMCU Custom Firmware
If you want to build custom NodeMCU firmware for the ESP8266. I suggest you don’t build it yourself but have it built by this configurable service. All you have to do is to define the branch from which to build and the user modules to include and… Hey Presto! there’s your personal firmware for you to download. If you’re new to the whole IoT frenzy and ESP8266 in particular I recommend the following two tutorials for starters:
Three way to build custom firmware for our ESP8266 NodeMCU Board.
- Web Browser
- Mail Service
Steps to Follow
- Go to NodeMCU custom builds Cloud Builder website click here.
- Enter your email address two times (Ex : [email protected])
- Select Branch to Build From (Select What ever you want Example : ADC, GPIO, HTTP, Wi-Fi)
- Miscellaneous Options (Just Leave it)
- Click Start Your Build (Web Redirect Message)
- Now Open your given mail and wait few moments, you will get a two mails. First one is Started Notification mail and another one is Finish Notification
- Started Notification
- Finish Notification
- Now click the bin file and download, Done !!
- Started Notification
Mongoose OS Firmware
- This is web based tool but not in online so it will geet firmware from GitHub automatically
ESP8266 Flash the Firmware
All programming methods the same way to flashing firmware. If your using NodeMCU Dev board make sure gpio-0 is low by pressing button. when working mode gpio-0 should be high or floating.
- How to flash the firmware to ESP8266?
- How to re-flash the firmware to ESP8266?
Above question are same solution only. flash and re-flash the firmware are same thing. somebody confusing about these two things.
Flash Firmware using Development Boards (NodeMCU Dev Board, Spark-fun Things)
- The development board itself have inbuilt programmer. So press the flash button (gpo-0 goes low) then flash firmware into esp8266 using flashing tools.
Flash Firmware using USB to Serial Programmer
Watch Video Tutorial first (How to Flash Firmware to ESP8266)
Required Hardware and Software Tools
- 1 – ESP8266 module (Used ESP8266 -12E from Ai-Thinkers)
- 1 – USB to TTL/Serial Programmer (Used PL2303)
- Flasher Tool (Used NodeMCU Firmware Flasher, You can use any firmware flasher tool)
- AT Firmware (download .bin file)
Basic Firmware Flash circuit
- See the source in GitHub
Basic Firmware Flash diagram
Steps to follow:
- Connect ESP8266 with programmer as per the above connection
- Note : GIPO-0 Must be low or Pull Down mode
- Open the Flasher tool
- Select correct “COM Port” at Operation Section
- Add a “.bin” file at config tab section
- click “Flash Button” in Operation Section
- After Flash Completed. The green tick will be shows
Flash Firmware using Arduino Board Programmer
- Remove Atmega320P chip or other At-mega IC
- ESP8266 chip GPIO-0 pin should be low (Program Mode-Flash firmware)
- Check Enabled Arduino COM port in Device Manager
- Open ESP8266 Flasher tool
- Select “Config”
- Upload your firmware
- Click “Flash” button in operation tab, when firmware uploaded was done.
- While flash mode GPIO-10 LED is keep blinking in ESP8266
Check AT Firmware is working
- Make GPIO-0 pin as high or Pull up (working Mode)
- Open the serial Software like Terminal, Esplorer, Putty (Used Terminal Tool)
- Open Terminal tool
- Select Correct COM Port & Baud Rate “9600” or “Custom“
- Send “AT” (You will get “OK” Reply)