Page 1 of 1

Wemos D1 mini stuck in bootloop after flashing 1.8.4, 1.8.5, 1.8.5-latest

Posted: Sat Oct 29, 2016 9:41 pm
by tomas.rollo
Hello,

I'm trying to learn Micropython using the Wemos D1 mini board and have problems when trying to flash any of the latest official Micropython images - my board is stuck in bootloop after I flash and I cannot get into REPL.

I'm using the following Esptool 1.1 commands to flash:
esptool.py --port <my board COM port> erase_flash
esptool.py --port <my board COM port> --baud 460800 write_flash --flash_size=4M 0 <image file>
The flash commands work without any reported problem or error.

I've tried on all 4 of my Wemos boards to rule out defective board case and am getting the same error on all.

I'm getting the "system param error" with both esp8266-20160909-v1.8.4.bin and esp8266-20161017-v1.8.5.bin, see following Putty serial connection screenshots:
- 1.8.4: http://j86i.imgup.net/error_esp8e52d.png
- 1.8.5: http://a12i.imgup.net/error_esp855de.png

I'm getting a different error with esp8266-20161029-v1.8.5-75-g6a2c609.bin: "Fatal Exception 28(LoadProhibitedCause)", see http://b16i.imgup.net/error_esp87ac2.png

The only image that is working is the firmware-combined.bin file I downloaded from https://bitbucket.org/thesheep/d1worksh ... mbined.bin (linked from http://micropython-on-wemos-d1-mini.rea ... setup.html)

Any ideas what am I doing wrong?

Thanks
T.

Re: Wemos D1 mini stuck in bootloop after flashing 1.8.4, 1.8.5, 1.8.5-latest

Posted: Sat Oct 29, 2016 11:01 pm
by tomas.rollo
Well, and I've just found a solution almost right after I submitted the original post for approval :D

Turns out I had the --flash_size parameter wrong, it's supposed to be --flash_size 32m for Wemos D1 (since it has 4MB flash, thus 32Mb...

I'm also now specifying the flash mode to dio (--flash_mode dio), not sure if it helps or not, but it's working.

Got the stable 1.8.5 running on my Wemos D1, which is great...

T.

Re: Wemos D1 mini stuck in bootloop after flashing 1.8.4, 1.8.5, 1.8.5-latest

Posted: Sat Oct 29, 2016 11:05 pm
by mcauser
Have you tried flashing at a lower baud rate? eg. 115200?
The USB-TTL chip CH340G is a little flakey on OS X at speeds above 115200.
Not sure if its a problem with the chip, or OS X driver.

Judging from your screenshot, looks like you are on Windows.
Has anyone experienced problems with CH340G above 115200 baud on Windows?

To upload to my D1 minis, I use:
-flash_mode=dio --flash_size=32M
(32 megabits = 4 megabytes)

Tried adding the --verify option to esptool.py?

The erase_flash command runs really quick on my machine, so I run it twice, just to be sure.

I have each D1 mini revision running MicroPython 1.8.0 through 1.8.5, both precompiled firmware (on micropython.org/download/) and self-compiled on OS X Yosemite + El Capitan.

Re: Wemos D1 mini stuck in bootloop after flashing 1.8.4, 1.8.5, 1.8.5-latest

Posted: Sun Oct 30, 2016 6:25 am
by pythoncoder
I found the WeMos and the reference board unreliable under Linux at 460800 baud. The upload usually worked, but failed sufficiently frequently for me to conclude that 115200 saved time overall. That rate was 100% reliable on WeMos and reference boards.

Re: Wemos D1 mini stuck in bootloop after flashing 1.8.4, 1.8.5, 1.8.5-latest

Posted: Sun Oct 30, 2016 7:35 pm
by bitninja
Thanks guys, I missed the

Code: Select all

--flash_size=32M
and was having trouble with my custom builds not working on my WeMos D1 Minis. Not really a boot loop issue, but just unable to get a REPL prompt. Just gibberish.

Re: Wemos D1 mini stuck in bootloop after flashing 1.8.4, 1.8.5, 1.8.5-latest

Posted: Sun Oct 30, 2016 7:43 pm
by ernitron
Hi bitninja, that drove me nuts too :-|

Anyway as far as I remember the make deploy defaults to -fs="detect" which actually is not supported for Wemos D1 mini so I tried 4m at first. It took me one full afternoon to get that 4m was referring to bits and not bytes :oops:

Re: Wemos D1 mini stuck in bootloop after flashing 1.8.4, 1.8.5, 1.8.5-latest

Posted: Tue Nov 01, 2016 4:48 pm
by jms
I've grumbled before about the illiteracy among many coders concerning units.

After my change recent versions of esptool warns if it isn't going to fit which helps a bit.