Flashing NodeMCU firmware to ESP8266 module

Hello Guys in this tutorial we will be flashing NodeMCU firmware to ESP8266 a low-cost Wi-Fi-enabled microchip with micro-controller capability. Using this module we can create connected nodes which can do IOT related stuff.

1. Requirements


  1. ESP8266 module
  2. Python should be installed

2. Building the Firmware


 

First we need to build the firmware for flashing. This can be build using Cloud Build Service . This service will take few arguments from you and then scripts will build the firmware for you.

For building firmware, you have to enter your email id along with the branch from which you want your build. After that choose the modules you want to build and trigger the build. Once it’s completed then it will shoot a success mail along with binaries links to download.

For this tutorial we will be including the following modules:

  • net
  • node
  • GPIO
  • file
  • timer
  • UART
  • wifi
  • mqtt

3. Start ESP8266 in flashing mode


ESP8266 should be in Flash mode to flash Firmware. It can be started in flash mode by pressing flash button while powering on the module.

4. Flashing Firmware to ESP8266


The next step is to flash this firmware into ESP8266. For flashing we will be using a python tool called esptool. We will be using version 2.2.1 of esptool. Important! To run this script you must have python installed on your computer.

Download esptool from the page and unzip it somewhere. Then go inside the directory where you have unzipped the esptool. Here you have to run the following command.

4.1 Variables will be resolved as per below table :
  •  <serial-port-of-ESP8266> points to the serial port to which your ESP8266 is connected. This value is /dev/tty.wchusbserial1410 in my case. This can be found using following command on mac.
    • 1ls /dev/tty.*
  • <mode> is qio for 512 kByte modules and dio for >=4 MByte modules. So it will be dio in our case.
  • <nodemcu-firmware> should be replaced by path of binary.
4.1 So our final command should look something like this.

After this you will see some kind of progress that will indicate that Firmware is being flashed.

Please comment for any suggestions.

Further Readings

guru

Technology enthusiast. Loves to tinker with things. Always trying to create something wonderful using technology. Loves coding for Android, Raspberry pi, Arduino , Opencv and much more.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *