-->
Page 1 of 3

Problem flashing NodeMCU

PostPosted: Mon Jan 16, 2017 5:30 am
by Alessandro Apollonio
Hi, I just downloaded a new firmware from https://nodemcu-build.com/.
When I'm trying to flash it with this command:
python ./esptool.py --port=/dev/cu.SLAB_USBtoUART write_flash -fm=dio -fs=4MB 0x00000 nodemcu-master-13-modules-2017-01-13-14-43-14-integer.bin

I got this strange error:

Wrote 476019 bytes (309465 compressed) at 0x00000000 in 27.2 seconds (effective 139.8 kbit/s)...
File md5: 342f49a9e607dc928caf70766fa4e5fc
Flash md5: 39596b35e7ce637c28c8e6e7cff254bc
MD5 of 0xFF is 7b10d95352feea3be31a0ee874a109a6

A fatal error occurred: MD5 of file does not match data in flash!


Any suggestion?
Thanks!!

Re: Problem flashing NodeMCU

PostPosted: Mon Jan 16, 2017 1:10 pm
by JP Lev
Hi,
I have the same problem.
tried with the cloud build of the firmware and compiled the firmware myself (flashing the 0x00000.bin and 0x10000.bin files)

Have the same error.
Flash md5: 732400f053fc1da7ba594385aab03617
MD5 of 0xFF is 46d1fb1602b3a7f7631a1c1ab63177ec

A fatal error occurred: MD5 of file does not match data in flash!

any clue?

Re: Problem flashing NodeMCU

PostPosted: Mon Jan 16, 2017 1:58 pm
by devsaurus
Which type of module do you have? If it's really a 512KByte version then your image probably doesn't fit into the flash.
Also see viewtopic.php?f=160&t=12870

Re: Problem flashing NodeMCU

PostPosted: Mon Jan 16, 2017 4:04 pm
by marcelstoer
Alessandro Apollonio wrote:python ./esptool.py --port=/dev/cu.SLAB_USBtoUART write_flash -fm=dio -fs=4MB 0x00000 nodemcu-master-13-modules-2017-01-13-14-43-14-integer.bin


Try erasing flash first and then omit the flash size parameter.

"-fs=4MB" confused the heck out of me because you need to give the size in mega bits rather than mega bytes - or so I thought. However, you're right https://github.com/espressif/esptool#fl ... h_size--fs now lists the size in MB.

That's wrong, though.

This is the commit that changed the documentation on January 9th: https://github.com/espressif/esptool/co ... 76d2eec7d8 The commit message indicates that the README was updated to prepare for the (upcoming) 2.0 release. That one is not release yet, though (check https://github.com/espressif/esptool/releases). So, as long as you work with esptool.py 1.x you'd have to set "-fs=32m" for a 4MB module.

Starting with v1.2 you can omit the flash size parameter and let esptool.py detect it automatically and thus avoid all confusion.