both 1.5.1 & 1.5.4.1
Nodemcu v2 (4Mbit flash, flash manufacturer 0xe0 (LG semiconductor?))
I'm powering it from the usb port of my macbook (it can deliver 1A) or using my bench supply.
First I used the (awesome!) nodemcu-build.com to build the firmware with these modules: file, gpio, net, node, tmr, uart, wifi, ws2812. Then I flash the firmware like this:
esptool.py write_flash 0x00000 nodemcu-master-8-modules-2016-08-10-17-47-53-integer.bin
Then I reset the module using it's button and the it enters a loop where it repeats to following:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 23988, room 16
tail 4
chksum 0x7b
load 0x3ffe8000, len 2184, room 4
tail 4
chksum 0xcb
load 0x3ffe8888, len 8, room 4
tail 4
chksum 0x60
csum 0x60
rf_cal[0] !=0x05,is 0xFF
So I never see the eLua prompt which is what I expected. The above procedure used to work for me using older firmware though.
Things I tried with the same results:
esptool.py erase_flashesptool.py write_flash 0x00000 nodemcu-dev-8-modules-2016-07-31-14-40-26-integer.bin 0x7c000 esp_init_data_default.binActually, my theory is that the firmware is too large for a 4Mbit flash chip. Could this be? Is that what the last line in the boot log means?:
rf_cal[0] !=0x05,is 0xFF
I understand this is might not be regular Nodemcu firmware issue but I didn't know what would be a better place to go to. If only I could get some hints where to look further as after a couple of nights of banging my head on this I'm out of options.
Please, read flash docs.
You need to upload esp_init_data_default.bin AND specify flash size/mode in esptool options.
Also I really don't think you have "4 mbit" flash, most probably there is 4 mbyte chip (32 mbit). So address of esp_init_data_default.bin should be 0x3fc000 (for 32m).
I didn't know what would be a better place to go to.
thx @djphoenix, indeed it works with the size at 32mbit. I was on the wrong track when Expressif's boot1.1 reported '4Mbit'. 馃槃
Sometimes you just want to reach into the monitor and give someone a hug for leaving a note on an issue that fixes your brainfart and loop/lopp/lopp/loop nightmares :) :)
Thanks guys!
python ./esptool.py --port=/dev/cu.SLAB_USBtoUART write_flash -fm=dio -fs=32m 0x3fc000 ~/Downloads/esp_init_data_default.bin
..... and I can finally go to bed!
@PhilETaylor Note that if you build a firmware from the dev branch you don't need the esp init data part any more, the firmware does that for you (will be on master in six weeks).
Actually last night EVERY custombuild I ran with the cloud service failed - even if I just entered my email and clicked the build button with no changes to the selections. The bin file I eventually used was one built from master with the cloud service earlier in the week... Im thinking the custom build service might be broken at the moment...
@PhilETaylor that was because the Espressif server from which we download the SDK during the build was unavailable for several hours.
No worries - thought I would mention it just in case :)
Most helpful comment
Please, read flash docs.
You need to upload
esp_init_data_default.binAND specify flash size/mode in esptool options.Also I really don't think you have "4 mbit" flash, most probably there is 4 mbyte chip (32 mbit). So address of
esp_init_data_default.binshould be 0x3fc000 (for 32m).