echo '' ;

ESP8266 – How to build and flash firmware?

ESP8266 Build and flash the firmware is a very easy job. before that, you need to choose the correct esp8266 platform (Arduino Core, AT Command, NodeMCU, Mangoes OS, Micro-python) for your requirements. 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 the code ourselves. 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 starting your application.

if you select AT commands, NodeMCU, Mongoose, and ESPressif methods you need to flash the firmware before. In the Arduino method, you don’t need to flash the firmware first. when uploading the Arduino compiler build the firmware with our application code as a bin file. Flashing the firmware to esp8266 is very easy and simple.


Build Firmware for ESP8266

Build the firmware for ESP8266 is also simple, but you need to choose your platform first. This means determining the method you want to use for your application. If you are a beginner, the most preferred method is the NodeMCU Lua method. In the last section, you saw the different ways of programming methods in ESP8266. If you haven’t seen that previous section, you won’t be able to understand the discussion below. Here, we’ll discuss how to build the firmware for all the programming methods of ESP8266

NodeMCU Firmware
Example: NodeMCu

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 with that time required library is added with the help of a 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 methods to build custom firmware for our ESP8266 NodeMCU Board.

Required to Build the firmware for ESP8266

  • Web Browser
  • Mail Service

Steps to Follow

  • Go to  NodeMCU custom builds  Cloud Builder website click here.
  • Enter your email address two times (Ex : info@aruneworld.com)
  • 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 !!

Mongoose OS Firmware

  • This is web-based tool but not in online so it will geet firmware  from GitHub automatically

Flash the Firmware intoESP8266

                      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)
  • Wires
  • Flasher Tool (Used NodeMCU Firmware Flasher, You can use any firmware flasher tool)
  • AT Firmware (download .bin file)

Basic Firmware Flash circuit

Image Source

Basic Firmware Flash diagram

Steps to follow:

Steps for Flash the firmware
Steps for Flash the firmware

  • 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)

Next

Previous section we discussed, 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 :

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from ArunEworld

Subscribe now to keep reading and get access to the full archive.

Continue reading