I had serious problems today flashing NodeMCU firmware on my new ESP-01 boards with my Windows XP virtual machine today. As I could communicate with the boards from Mc OS X directly, there is nothing wrong with the boards. But after spending some hours trying different USB-to-serial boards without success, I finally searched for a way to flash the firmware with Mac OS X directly as well.
|ESP8266 with DHT22 as wireless|
remote sensor. A TD6810 buck
delivers 3.3V from USB.
sudo python setup.py install
This will take care of all necessary dependencies like installing pySerial libraries and so on. After the installation finished, you can check whether the tool works correctly. Make sure to tie GPIO0 to GND and restart the board for getting into flash mode:
sudo esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 read_mac(adopt the port to your USB-to-serial interface)
This should return your MAC address:
Now you can download for example the latest nodeMCU firmware from the project site and flash it with this commandline:
sudo esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash 0x00000 nodemcu_float_0.9.6-dev_20150704.bin
Adopt the device name to your USB-to-serial - and set the baud rate higher. With 115kbps the process will need nearly a minute:
Took 2.04s to erase flash block
Wrote 462848 bytes at 0x00000000 in 45.5 seconds (81.3 kbit/s)...
Now remove the GPIO0 pulldown to GND and work for example with ESPlorer to program a LUA script.