3

Yesterday i tried to generate new firmware bin from nodemcu-build.com and after flashing with esptool.py, my esp started blinking (blue diode on esp chip) and sending out (trough USB converter) garbage data. I tried to generate build with combination of modules, tried to flash them (binary and float) and it always start blinking and sending out garbage. Than my co-worker tried his older build and everything worked perfectly, than he send me his older build and after flashing everything works also perfectly. So there is no problem with flashing tool or system (tested on both mac and linux) and no problem with old builds. Any new build is failing for us.

My flashing command:

esptool.py -p /dev/cu.wchusbserialfa130 write_flash 0x0 nodemcu-master-13-modules-2016-04-09-12-28-55-float.bin --verify

Anybody idea where is possible problem or what we doing wrong?

Marcel Stör
  • 22,695
  • 19
  • 92
  • 198
jan smrz
  • 31
  • 2
  • 2

4 Answers4

13

I'm quite certain you're missing two points explained in the NodeMCU flashing docs:

  • esptool.py write_flash options
  • flashing the correct Espressif init data

Assuming you've got a 4MB device such as ESP-12E / WeMos D1 mini / NodeMCU devkit v2 (comparison) the write_flash options are -fm dio -fs 32m.

You're likely upgrading from an older NodeMCU version. Therefore, you need to flash esp_init_data_default.bin to the right memory address.

Hence, the full flash command should be something like that:

esptool.py --port /dev/cu.wchusbserialfa130 write_flash -fm dio -fs 32m 0x00000 nodemcu-master-13-modules-2016-04-09-12-28-55-float.bin 0x3fc000 esp_init_data_default.bin

Update 2016-10-20

Thanks to a fix in the firmware you won't have to provide the init data yourself anymore, the firmware does it automatically if necessary. Has been available in the dev branch for a few days and will also be on master in early December 2016.

Marcel Stör
  • 22,695
  • 19
  • 92
  • 198
  • You can download the esp_init_data_default.bin from Espressif GitHub repo: https://github.com/espressif/ESP8266_AT/tree/master/bin – jmartinalonso Oct 29 '16 at 15:23
  • @jmartinalonso I suggest you stick with the link we have in the NodeMCU documentation (for `dev` or `master` branch) to make sure you get the correct version. – Marcel Stör Oct 29 '16 at 21:12
2

I faced the same issue. I did the following steps, which solved the problem. Before flashing a new firmware, make sure your chip is fully erased. You may use the command below where "serial-port-of-ESP8266" may vary:

esptool.py --port <serial-port-of-ESP8266> erase_flash

Then flash the firmware to the chip using the same technique you use for flashing nodeMCU 0.9.6. You can refer the command below, which is what I used for flashing.

esptool.py --port /dev/ttyACM0 write_flash -fm qio 0x00000 nodemcu-master-8-modules-2016-12-16-09-52-59-float.bin
0

same problem and resolved with Marcel solution, but please take care about flash options: -fm dio -fs 32m

i was trying without, so only appending the esp_init_data_default.bin, but it doesn't work.

you can check it because esptool shows, just before stating flash, an hexadecimal value Flash params set to 0x0000 (wrong) Flash params set to 0x0240 (fine!)

0

Tried to get it running but no way for my "WeMos Mini D1" using this line

esptool.py --port /dev/ttyUSB0 write_flash -fm dio -fs 32m 0x00000 my-nodemcu.bin 0x3fc000 esp_init_data_default.bin --verify

Answer is:

Wrote 454656 bytes at 0x0 in 39.2 seconds (92.9 kbit/s) 
WARNING: Unlikely to work as data goes beyond end of flash. Hint: Use --flash_size 
Writing 36864 @ 0x3fc000... 16384 (44 %)
A fatal error occurred: Write failure, status: 36'

The image from the cloud build has only 6 options, so its unlikeley that the image is too large.

user1226230
  • 381
  • 1
  • 3
  • 11
  • Solved: chip obviously defective. Changed to ARDUINO IDE and similar problem with restarts when activating WIFI. – user1226230 Nov 01 '16 at 18:30