Flashing micropython on Wemos D1 Mini Pro

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
amartino
Posts: 6
Joined: Mon Feb 20, 2017 11:00 am

Re: Flashing micropython on Wemos D1 Mini Pro

Post by amartino » Wed May 17, 2017 1:19 pm

Here is what I've experienced.

This successfully flashes the D1 mini (but isn't usable for the PRO)

Code: Select all

esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20170108-v1.8.7.bin
This successfully flashes the D1 mini PRO

Code: Select all

esptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 32m 0 esp8266-20170108-v1.8.7.bin

torkinp
Posts: 4
Joined: Tue Jan 17, 2017 9:57 am

Re: Flashing micropython on Wemos D1 Mini Pro

Post by torkinp » Tue Apr 03, 2018 5:34 pm

Hi,

It is now possible to flash micropython on boards with 16MB e.g. Wemos Mini D1 Pro, with the full 16MB usable.

Full details available here: https://github.com/micropython/micropython/issues/2335

In summary:
1) either compile the two required files (firmware-combined.bin and esp_init_data_default.bin) yourself or download the zip at the above link, created by user keijsvog

2) erase the ESP8266...

Code: Select all

esptool.py --port /dev/ttyUSB0 --baud 460800 erase_flash
3) flash both the micropython firmware and the esp_init_data_default.bin...

Code: Select all

esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash -fm dio -fs 16MB 0 firmware-combined.bin 0xffc000 esp_init_data_default.bin
To confirm, go to the REPL and use:

Code: Select all

>>> import esp
>>> esp.flash_size()
16777216
>>> 
It has been a long time coming, but at last we can use the full 16MB. This will open up many opportunities, for example working with web data sources/APIs that return larger data sets.

:)


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

Re: Flashing micropython on Wemos D1 Mini Pro

Post by pythoncoder » Sun Apr 15, 2018 9:22 am

404.
Peter Hinch

Deedee
Posts: 3
Joined: Thu Jan 24, 2019 3:31 pm

Re: Flashing micropython on Wemos D1 Mini Pro

Post by Deedee » Thu Dec 26, 2019 3:02 am

Here is an update on how to flash ESP8266 boards with 16MB flash memory for Win users.
Python and esptool is expected to be installed already.

I wrote a batch file that does all the required steps in a sequence sorting out all params for esptool.

The file name I used is ESP-Flash16MB.bat and just contains these two lines:
esptool.py --port %1 --baud 460800 erase_flash
esptool.py --port %1 --baud 460800 write_flash -fm dio -fs 16MB 0x00000 %2 0xffc000 esp_init_data_default.bin


To use it, a cmd window needs to be opend and one has to navigate to the folder the two .bin files and the .bat file had been copied before:
esp_init_data_default.bin
esp8266-20191220-v1.12.bin (<- just example, this one I used)
ESP-Flash16MB.bat (<- the .bat I described above) :-)

Then just call the .bat file adding the com port number (mine was com27) and micropython .bin file from
http://micropython.org/download#esp8266 to be flashed:
ESP-Flash16MB.bat com27 esp8266-20191220-v1.12.bin

Et voila, the module gets erased and both bin files flashed in a single go.
No hassle, no big deal even for beginners.

Just flashed all my Wemos D1 mini pros 16MB successfully with latest version of MP V1.12 we received as X-Mas present.

BTW: Thank you George!

Best wishes to all of you.
Merry X-Mas and Happy New Year!

Post Reply