Micropython on a WeMos Di Mini

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
bguenthe
Posts: 11
Joined: Fri Jul 22, 2016 3:37 pm

Micropython on a WeMos Di Mini

Post by bguenthe » Fri Jul 22, 2016 3:59 pm

Hi,

I just installed the binary release esp8266-2016-07-22-v1.8.2-29-gb652ee7.bin with esptool.py on an wemos d1 mini.

Fist I erase the the flash, then I use this:
C:\Python27\Scripts>..\python esptool.py -p COM4 write_flash 0x0000000 esp8266-2016-07-22-v1.8.2-29-gb652ee7.bin
esptool.py v1.1
Connecting...
Running Cesanta flasher stub...
Flash params set to 0x0000
Writing 512000 @ 0x0... 512000 (100 %)
Wrote 512000 bytes at 0x0 in 48.4 seconds (84.7 kbit/s)...
Leaving...

After resetting the blue LED flashes very fast and a serial connect gives the following message:

"▒▒g▒▒▒▒crc▒▒c쇜▒▒d▒▒▒▒xbd`▒▒d▒Fatal exception 28(LoadProhibitedCause):
epc1=0x4024ff23, epc2=0x00000000, epc3=0x00000000, excvaddr=0x02050504, depc=0x00000000

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 30804, room 16"

I thougth the hardware may be broken but after flashing my Arduino MQTT demo, everithing works fine.

Any ideas on that?

Thank in advance

Bernd

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

Re: Micropython on a WeMos Di Mini

Post by pythoncoder » Fri Jul 22, 2016 4:42 pm

I successfully flashed this build to three WeMos D1 Mini's today, using the following incantation (under Linux):

Code: Select all

esptool.py -p /dev/ttyUSB0 erase_flash
esptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 32m -ff 40m 0x00000 esp8266-2016-07-22-v1.8.2-29-gb652ee7.bin
Clearly you'll need to change the port designation, but give it a try. Press the reset button after flashing.
Peter Hinch
Index to my micropython libraries.

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

Re: Micropython on a WeMos Di Mini

Post by jms » Fri Jul 22, 2016 8:41 pm

My experience is the Windows GUI tool works and esptool doesn't.

bguenthe
Posts: 11
Joined: Fri Jul 22, 2016 3:37 pm

Re: Micropython on a WeMos Di Mini

Post by bguenthe » Sat Jul 23, 2016 4:45 am

I fash from Windows. What is the name of the Windows GUI you mention?

bguenthe
Posts: 11
Joined: Fri Jul 22, 2016 3:37 pm

Re: Micropython on a WeMos Di Mini

Post by bguenthe » Sat Jul 23, 2016 5:37 am

Hi,

Finally got it. Under Windows use nodemcu-flasher (https://github.com/nodemcu/nodemcu-flasher) under Win32 (or Win64)/Release

Under "Operation" set your COM-Port, under "Config" set the path to the binary at 0x00000 under advanced set:
baudrate to 921600,
flash size to 4MByte,
FlashSpeed to 80MHz
SPI Mode to DIO

Under Operation Click "Flash", wait a bit. Press the rest button.

After flashing I use putty with connection type serial and speed 115200. Afer the connection to got a black screen, press enter and the pyton prompt appears :-)

Bernd

bguenthe
Posts: 11
Joined: Fri Jul 22, 2016 3:37 pm

Re: Micropython on a WeMos Di Mini

Post by bguenthe » Sat Jul 23, 2016 5:49 am

Hi,

sorry for beeing so fast-paced in the morning. My coffee is a bit strong :-)

I totally miss that there was another post, sorry.

When you set the correct flash parameter like ..\python esptool.py --port COM4 write_flash -fm dio -fs 32m -ff 40m 0x0000000 esp8266-2016-07-22-v1.8.2-29-gb652ee7.bin everything works fine with the esptool.py under Windows.

Bernd

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

Re: Micropython on a WeMos Di Mini

Post by mcauser » Sat Jul 23, 2016 6:47 pm

Does the Windows CH340G allow you to upload at 921600?
On OSX the driver won't let you upload any faster than 230400 :?

Post Reply