Update ESP8266 development kit NodeMCU firmware using OS X

2 min read

I have previously written a small guide to getting started programming the ESP8266 development kit with the NodeMCU firmware. This post assumes that you have a fully working setup. Specifically I use the Seeedstudio NodeMCU v2 - Lua based ESP8266 development kit. I will flash to the latest version of NodeMCU.

Update the firmware

  1. Connect the ESP8266 via a micro-usb cable to the computer
  2. Make sure no program is using the serial port to the ESP8266
  3. Download and unpack esptool, either as a zip file or using git clone:
$git clone https://github.com/themadinventor/esptool.git
  1. OS X (Yosemite) already comes with python 2.7, but we need to install the pySerial dependency. Open a terminal and type
$sudo python setup.py install
  1. Download the latest ESP8266 NodeMCU firmware from here. Get the nodemcu_integer_*.bin file if you are unsure, for this example the newest version was nodemcu_integer_0.9.6-dev_20150704.bin
  2. Go to the esptool folder, e.g.
$cd ~/Downloads/esptool
  1. Flash the firmware using the following command. Replace /dev/tty.SLAB_USBtoUART with the name of the serial port you are using and ~/Downloads/nodemcu_integer_0.9.6-dev_20150704.bin with the path to the firmware you downloaded in step 5.
$sudo python esptool.py --baud 921600 --port /dev/tty.SLAB_USBtoUART write_flash -fm dio 0x00000 ~/Downloads/nodemcu_integer_0.9.6-dev_20150704.bin
  1. If everything is done right you should see the following
Connecting...
Erasing flash...
Writing at 0x00070c00... (100 %)
Leaving...
  1. Reconnect to the ESP8266 using ESPlorer or any other similar software and confirm that the ESP8266 is updated to the newest version. Using the RST button will restart the device and print the version at the boot

Troubleshooting

$sudo python esptool.py --baud 921600 --port /dev/tty.SLAB_USBtoUART write_flash -fm dio 0x00000 ~/Downloads/esp_iot_sdk_v0.9.5/bin/boot_v1.2.bin
$sudo python esptool.py --baud 921600 --port /dev/tty.SLAB_USBtoUART write_flash -fm dio 0x01000 ~/Downloads/esp_iot_sdk_v0.9.5/bin/at/user1.512.new.bin
$sudo python esptool.py --baud 921600 --port /dev/tty.SLAB_USBtoUART write_flash -fm dio 0x3e000 ~/Downloads/esp_iot_sdk_v0.9.5/bin/blank.bin
$sudo python esptool.py --baud 921600 --port /dev/tty.SLAB_USBtoUART write_flash -fm dio 0x7e000 ~/Downloads/esp_iot_sdk_v0.9.5/bin/blank.bin

Then retry step 7 to 9 in the guide with the selected NodeMCU firmware.

Enjoyed this content?

Help keep it free by sending a donation. You can also subscribe to various site feeds to get notified of new posts, follow me on social media, and more.

↑ back to top