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: 5956
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
Index to my micropython libraries.

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!

holdenweb
Posts: 10
Joined: Wed Mar 09, 2016 12:40 pm

Re: Has anyone had success?

Post by holdenweb » Tue Nov 14, 2023 3:43 pm

pythoncoder wrote:
Tue Jan 03, 2017 8:08 am
Is there an issue with the D1 Mini Pro? The D1 Mini works fine and is widely used. Alas I don't have a Pro: has anyone managed to run MicroPython on one?

There is this issue https://github.com/micropython/micropython/issues/2335 which appears unresolved.
I believe there is some sort of issue. I used D1 Mini quite a bit with no problems on micropython 1.18 and prior. Now I find it's either impossible to load micropython, or when it loads it immediately enters a reboot loop, with the watchdog timer firing at perhaps 20-second intervals. While I'm aware there are unreliable clones of the Mini, I'm seeing these problems on genuine Lolin D1 Mini v4.0.0 hardware purchased directly from the Wemos store.

I'm just a hobby user, so I've switched to the far more reliable Raspberry Pi Pico for now, and if I need to reduce the form factor there are smaller RP2040-based systems around. A shame, but I No longer have time to waste on these issues.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Flashing micropython on Wemos D1 Mini Pro

Post by Roberthh » Tue Nov 14, 2023 4:18 pm

When I saw you post first in the discussion forum, I tried to build & load the ESP8266 firmware for a Wemos D1 mini. It worked as expected. Are you sure that you flashed the firmware with the right flash mode setting? Maybe you need a setting different from the default.

Post Reply