Flashing NodeMCU Firmware on the ESP8266 using Windows

Содержание

If you’re new to the ESP8266 WiFi module, first read my Getting Started Guide with the ESP8266.

Why flashing your ESP8266 module with NodeMCU?

NodeMCU is a firmware that allows you to program the ESP8266 modules with LUA script. And you’ll find it very similar to the way you program your Arduino. With just a few lines of code you can establish a WiFi connection, control the ESP8266 GPIOs, turning your ESP8266 into a web server and a lot more.

Where to buy?

You can click here to compare the ESP-01 Board price at different stores.

Schematics (3.3V FTDI Programmer)

And you can check this page to get an FTDI programmer at the best price.

esp8266_pinout_h-569x236

Wiring:

  • RX — TX
  • TX — RX
  • CH_PD — 3.3V
  • GPIO 0 — GND
  • VCC — 3.3V
  • GND — GND

ESP8266 Flasher

You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!

Downloading NodeMCU Flasher for Windows

After wiring your circuit, you have to download the NodeMCU flasher. It’s a .exe file that you can download using one of the following links:

You can click here to find all the information about NodeMCU flasher.

Flashing your ESP8266 using Windows

Open the flasher that you just downloaded and a window should appear (as shown in the following figure).

nodemcu_flaser

Press the button “Flash” and it should start the flashing process immediately (You might have to change some of the settings on the Advanced tab). After finishing this process, it should appear a green circle with a check icon.

Do you have any questions? Leave a comment down below!

Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page.

[eBook] Build Web Servers with ESP32 and ESP8266 (2nd Edition)

Build Web Server projects with the ESP32 and ESP8266 boards to control outputs and monitor sensors remotely. Learn HTML, CSS, JavaScript and client-server communication protocols DOWNLOAD »

Recommended Resources

Build a Home Automation System from Scratch » With Raspberry Pi, ESP8266, Arduino, and Node-RED.

Home Automation using ESP8266 eBook and video course » Build IoT and home automation projects.

Arduino Step-by-Step Projects » Build 25 Arduino projects with our course, even with no prior experience!

What to Read Next…

Flash/Upload MicroPython Firmware to ESP32 and ESP8266

ESP32 Client-Server Wi-Fi Communication Between Two Boards

ESP32 Client-Server Wi-Fi Communication Between Two Boards

MicroPython – Getting Started with MQTT on ESP32/ESP8266

Enjoyed this project? Stay updated by subscribing our newsletter!

42 thoughts on “Flashing NodeMCU Firmware on the ESP8266 using Windows”

Hey rui.. I got my cube one.. But number 1 on your schematic won’t light up.. The whole 3 led.. Why.

Hi I’m a hobbiest. I have a confusion that for flashing the fimware do I need the FTDI? I mean is there any alernative device to flash the firmware?

I use the droids usb/serial converter instead of the ftdi.

They cost about $5, so I bought two of them.

Hi Anthony,
Yes that also should work just fine!

How many hours will it take to flash ?

I see the blue ring status keeps rotating…never see green light…

And also from FTDI can we give Wifi module 5v ?

Had the same problem, check your baud rate – usually 9600 and ensure GP 0 is connected to ground. Flashing takes about 5 minutes and you should see the progress on the bar located in center of the window.

You have to reset the ESP while the blue ring status is rotating, just put the pin REST to ground for a while and it willstart the process

Thanks! Worked for me!!

Hello Rui and community,
please may you let me know what you mean by ” You might have to change some of the settings on the Advanced tab”? I tried to flash like discribed on top, it seams to work fine but then when loading/writing to Adress 0-7E00 the 4096Byte an error occurs, looking at the log file a time out seams to be the reason. does anyone let me know how to flash the ESP correctly without this error.

How about Linux

Hello Rui! Nice project!

I will like to know if i use this USB to TTL adapter ( goo.gl/fct9AL ) and i switch it to 3.3 volts it wont burn my ESP8266 right ?

Please answer me!
– Adi

NodeMCU Flasher does not allow upload of other software ??
when you try to upload :nodemcu_20150213: 15% i error
please help

hi
i am new to this module
i am using ubuntu 14 . i have a problem in flashing please help me n tell me the procedure to communicate with module

Hi Sreedhar,
The easiest way to flash the ESP with NodeMCU is using a Windows PC, then you can upload code using the ESPlorer which is multiplaform and it will run on any Operating System.
You can use this Python script to flash your ESP: github.com/themadinventor/esptool

Hi,
I bought the devkit 1.0.
What does flashing do?
What is the state of the kit out of the box? Is it dedicated to work with certain software or it has no bootloader so you flash it to upload the basic firmware?

What are the options to program it? Is there a firmware enables programming the chip with any IDE?

Hi Eagle,
You don’t need to flash your ESP, because your ESP version already comes with NodeMCU installed.
Other ESPs, for example, ESP version 01 comes with a firmware that uses AT commands.
I personally prefer the NodeMCU firmware, because allows you to use the ESP on board microcontroller and make the ESP a standalone device.
If you flash your ESP with NodeMCU, I recommend using the ESPlorer IDE.

OK .. thanks for your reply 🙂

1. nodemcu flash is for esplorer and lua loader, are there other IDEs work with this firmware?

2. How to program it with Arduino IDE?

3. esplorer is showing only com1, how to show other ports?

4. I tried to run this code with lua loader and didn’t work.
while 1 do
gpio.write(4,gpio.HIGH)
tmr.delay(10000)
gpio.write(4,gpio.LOW)
tmr.delay(10000)
end
I can switch the LED on pin 4 with lua control panel commands.

You’re welcome!
1) NodeMCU flasher is used to flash your ESP with NodeMCU. ESPlorer and Lua Loader are IDEs to program your ESP with Lua code
2) Here’s how to do that: https://randomnerdtutorials.com/how-to-install-esp8266-board-arduino-ide/
3) Click the refresh button it will show all the available COM ports
4) Have you set the GPIO as an output? Here’s a code example to blink an LED on GPIO 2: https://raw.githubusercontent.com/RuiSantosdotme/Random-Nerd-Tutorials/master/Projects/ESP8266/blink.lua

I hope this helps,
Rui

1. esplorer doesn’t recognize the chip, it keeps
PORT OPEN 9600
Communication with MCU…
Whether it’s com1 or com2.
So, now that’s the issue with esplorer right now.

2. With lua loader, it detects the module and I can control GPIO pins within the software, but I don’t know how to run a code.

Maybe because I’m having the nodemcu devkit with 17 gpio.
The code would be different.

Even with that, my 1st code should work, I don’t know why it doesn’t !!

Hi Rui,
Great work thank you for all you share. I hope you can comment on some experiences I’ve had. I was successful in flashing an ESP-7. Then loaded your led blinking sketch. In your code you specified GPIO4 , and that’s how I coded it. But the led stayed dark. Further investigation showed that GPIO2 was doing the flashing. I don’t understand why that is. Next issue is after uploading the blink sketch, I could not issue any lua commands to the ESP. Did the blink over write part of the nodemcu? Now I am trying to reflash the module, and having problems getting it to work, but had none the first time. Any insite would be greatly appreciated.

Hi John.
GPIO 2 refers to pin number 4.
This is not an error or bug. It’s how the NodeMCU firmware is defined: github.com/nodemcu/nodemcu-firmware#gpio-new-table–build-20141219-and-later
Open that link and go to the “GPIO New Table” section

Hi Rui, John here You’ve helped me so many times I hope you have time to help me again. As said in a previous post, I’ve successfully flashed an ESP7 using the flasher with an ftdi interface. I’ve used that module in your web server with success. Now I have an ESP12 I want to flash and am having trouble. I know the ESP12 is a bit different, and GPIO pin 15 must also be held low, along with GPIO-0. I’ve seen some say GPIO2 must be pulled Hi as well. I’ve tried it both ways without success. What happens is that the ESP12 gets the mac address, starts to write, then after about 20+ write sequences, stops. It appears to stop always at the same spot. The flasher log shows a timeout error.
I’ve looked all over the internet and have seen others with this issue, but never saw a resolution. As always, many thanks for any guidence you may have!

I tried flashing on two different ESPs, but on both the flashing process gets stuck at about 10% with an “Error:Write flash timeout.”

Do you know what could cause this problem? I already tried with and without external 3.3v power source, different flashers (had exactly the same problem, stuck at around 10%/1024kB). Nothing worked unfortunately.

Hi Freddy,
I’m not sure what it can be. Have you tried to use multiple baud rates? For some reason a few people told me that it solved their problem… https://randomnerdtutorials.com/esp8266-troubleshooting-guide/

I recently found out that it was my FTDI-Chips causing the problem. Using the GPIO serial ports of a Raspberry Pi worked like a charm. Thanks for your helpful tutorials!

Invalid head of packet
Why is this ?
this is what i get each time

Hi Rui, great tutorial. I recently bought a cheap NodeMcu (LoLin) dev kit 1.0. I can flash the 0.96 build, ut Esplorer doesn’t recognize the board. Can you give me some advice?
Thank you in advance

Hi Rui, My first project was one of yours, and it used NodeMCU 0.9.6 as the firmware. After some difficulty I finally got the flashing issues resolved, and went on to “bigger and better” things. I have an issue trying to connect to an ESP12 in AP mode. I posted a few questions on the “everything esp8266 forum under chat if you care to look. I was told that I should be using an updated version of NodeMCU. There is a caution in the docs to load esp_init_data_defalt.bin if updating from 0.9.x. I tried doing this via the NodeMCU flasher without success. It did upload but after restarting the module all it did was continuously restart with an output of:
ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 25644, room 16
tail 12
chksum 0x6d
ho 0 tail 12 room 4
load 0x3ffe8000, len 2256, room 12
tail 4
chksum 0x06
load 0x3ffe88d0, len 8, room 4
tail 4
chksum 0x52
csum 0x52
rf_cal[0] !=0x05,is 0x00
I followed the instructions to the best of my understanding, but obviously something is wrong. Can you help?


Источник: randomnerdtutorials.com