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

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
tomas.rollo
Posts: 2
Joined: Sat Oct 29, 2016 9:22 pm

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

Post by tomas.rollo » Sat Oct 29, 2016 9:41 pm

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.

tomas.rollo
Posts: 2
Joined: Sat Oct 29, 2016 9:22 pm

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

Post by tomas.rollo » Sat Oct 29, 2016 11:01 pm

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.

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

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

Post by mcauser » Sat Oct 29, 2016 11:05 pm

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.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

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

Post by pythoncoder » Sun Oct 30, 2016 6:25 am

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.
Peter Hinch
Index to my micropython libraries.

bitninja
Posts: 165
Joined: Thu Sep 15, 2016 4:09 pm
Location: Spring, Texas

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

Post by bitninja » Sun Oct 30, 2016 7:35 pm

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.

User avatar
ernitron
Posts: 89
Joined: Fri Jun 03, 2016 5:53 pm
Location: The Netherlands

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

Post by ernitron » Sun Oct 30, 2016 7:43 pm

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:

jms
Posts: 108
Joined: Thu May 05, 2016 8:29 pm
Contact:

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

Post by jms » Tue Nov 01, 2016 4:48 pm

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.

Post Reply