Chat about current Lua tools and IDEs

User avatar
By kirsch
#22536 I hope this is the right place for this sort of support questions.

Prior to this, I had been using an ESP-01 with a FT232R USB-to-UART on OS X Yosemite (which comes with built-in drivers for it). I was able to flash using esptool.py, and communicate using screen, ESPlorer, or minicom. All good.

Then I received my NodeMCU hardware. It's nice!. It came with NodeMCU firmware loaded and the SiLabs USB-to-UART chip. I installed the drivers for the USB-to-UART and was able to communicate with the NodeMCU just fine. Oddly, however, I couldn't talk to it with minicom (I don't know what to make of that but maybe it's helpful information to someone). I started developing right away with the stock firmware but at some point I uploaded a change that caused it to crash when executing init.lua. Rookie mistake, yes. The way out, I thought, was to flash a new firmware, which I wanted to do anyway. So I built it using Marcel Stör's excellent online tool: http://frightanic.com/nodemcu-custom-build

I flashed as usual (hold FLASH button while pressing RST which I think is equivalent to connecting GPIO0 to GND, use esptool.py), but ever since all I get is the dreaded
Code: Select all ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 28568, room 16
tail 8
chksum 0xef
load 0x33333333, len 858993459, room 0
flash read err, ets_unpack_flash_code
ets_main.c

at 74880 baud rate.

For what it's worth, and hopefully so someone can point out the stupid mistake I'm making, here's how I'm attempting to flash the chip:

Code: Select allKirsch0:esptool kirsch$ python esptool.py --port /dev/cu.SLAB_USBtoUART read_mac
Connecting...
MAC: 18:fe:34:a6:d5:e7
Kirsch0:esptool kirsch$ python esptool.py --port /dev/cu.SLAB_USBtoUART erase_flash
Connecting...
Kirsch0:esptool kirsch$ python esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x00000 nodemcu-dev096-7-modules-2015-07-06-02-21-42-integer.bin
Connecting...
Erasing flash...
Writing at 0x00056400... (100 %)

Leaving...


One interesting observation is that esptool.py communicates with the NodeMCU without me needing to reset while holding the FLASH button. Thanks for the help!
User avatar
By kirsch
#32377 Just to close the loop on this:
I was able to flash from a Windows PC, so I think this is an issue with the tools I was using on the Mac. The hardware itself was fine.