-
• #2
esptool.py --port COM3 --baud 115200 write_flash --flash_freq 80m --flash_mode dio --flash_size 4MB-c1 0x0000 boot_v1.6.bin 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin
This command works for me for flashing 1v95 on clone D1 mini's
-
• #3
Can you confirm flash size? D1 Mini Pro is a 16MB device, the D1 Mini is 4MB. I ended up just purchasing two units of the D1 Mini, hoping it'll be an interim solution until the 16MB version is supported.
-
• #4
Hi @user85573,
can you please share output of
esptool.py --port /dev/ttyUSB0 --baud 115200 flash_id
as 16MB is missing on my list of ids.W25Q40BV ( 4 Mega Bits / 512K Byte ) = ID 4013h
W25Q80BV ( 8 Mega Bits / 1 Mega Byte ) = ID 4014h
W25Q16BV ( 16 Mega Bits / 2 Mega Bytes ) = ID 4015h
W25Q32BV ( 32 Mega Bits / 4 Mega Bytes ) = ID 4016h
W25Q64CV ( 64 Mega bits / 8 Mega Bytes ) = ID 4017hEdit:
Ups missed than on your postmanuf 0xef chip 0x4018
so it is
W25Q128FV ( 128 Mega bits / 16 Mega Bytes ) = ID 4018h
-
• #5
Only espruino_1v95_esp8266_combined_512.bin does,
start with
esptool.py --port /dev/ttyUSB0 --baud 115200 erase_flash
and then follow
conversations http://forum.espruino.com/comments/14055829/ -
• #6
Thanks for your help! Keep in mind that
wifi.save()
is different thansave()
.save()
is for saving your current code to flash so thatonInit()
will run on next boot. So that thread doesn't seem relevant for my case, but I will try to flash the 4MB "distributed" binaries instead of the 512K ones and report back.I think that what's happening here is that the 1v95 binaries are built for 512K and 4MB models. No matter where you flash the components, the runtime code doesn't point to the right memory addresses. Guess I'll have to wait until a 16MB combined binary is available.
-
• #7
A 4mb build has more save pages
16 versus 3
-
• #8
Agreed, it's just that when I flashed
espruino_1v95_esp8266_4mb_combined_4096.bin
, I believe I got serial gibberish.But success!
./esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_freq 80m --flash_mode qio --flash_size 4MB-c1 0x0000 espruino_1v95_esp8266_4mb/boot_v1.6.bin 0x1000 espruino_1v95_esp8266_4mb/espruino_esp8266_user1.bin 0x3FC000 espruino_1v95_esp8266_4mb/esp_init_data_default.bin 0x3FE000 espruino_1v95_esp8266_4mb/blank.bin
On boot:
Flash map 4MB:1024/1024, manuf 0xef chip 0x4018
and able tosave()
and reboot without serial gibberish.In fact, it also works with just
4MB
(not4MB-c1
) size:Flash map 4MB:512/512, manuf 0xef chip 0x4018
.and with
./esptool.py write_flash --flash_size 4MB-c1 0x0000 espruino_1v95_esp8266_4mb_combined_4096.bin
The takeaway seems to be, don't let
esptool.py
guess the chip size @ 16MB and don't specify 16MB. -
• #9
In fact, it also works with just 4MB (not 4MB-c1) size:
IME, it appears to work, but when you do wifi.save(), it no longer boots and you have to reflash.
-
• #10
Ah ok, will test and report back on
4MB-c1
vs4MB
andwifi.save()
. -
• #11
Sure enough, with the 512/512 map,
wifi.save()
makes the device unbootable, spewing guts out on serial. Use4MB-c1
, even with the combined image. -
• #12
Thanks for you test and feedback.
Does is reconnect to the AP after
require('ESP8266').reboot()
? -
• #13
It does not...I've just been including Wifi in
onInit()
. -
• #15
Just to recap:
steps you did to get a stable Espruino:
erase flash
flash files from dir espruino_1v95_esp8266_4mb with flash_size 4mb-c1
Wifi stuff:
Wifi.connect(SSID, {password:SSIDPASS}, function(err){ if (err === null){ console.log('Connected to AP'); Wifi.stopAP(); Wifi.setConfig({powersave : 'none'}); Wifi.save(); } else { console.log('connetion error',err); } });
I am interested in output of console.log('connetion error',err);
-
• #16
Yes, the summary is accurate. That code doesn't work for me, even with tweaking. I'll need more time.
-
• #17
Just confirming that I was also able to correctly flash the d1 mini pro using 1v96 using the 4mb-c1 option too.
-
• #18
Thanks for sharing
-
• #19
For anybody else interested in getting the d1 mini pro up and running with Espruino, I've written a guide here: https://github.com/andrewwakeling/espruino-d1-mini-pro
Could use some help on this device. I can flash this fine with a 512m image, but with a few errors writing from the IDE at Espruino boot:
Flash map exception, manuf 0xef chip 0x4018
and
Specs for the device claim 16M bytes(128M bit) Flash...but I am not sure how to take advantage of that with esptool.py and the fragmented binary image files.
0xffc000
should be the place where init data is stored in 16MB map.causes the device to just spew gibberish out of the serial console.
Flashing the combined 4MB image
espruino_1v95_esp8266_4mb_combined_4096.bin
does not work. Onlyespruino_1v95_esp8266_combined_512.bin
does, but this doesn't allow the amount of code I'm developing as per above.