Page 2 of 4

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Tue Jan 03, 2017 12:20 pm
by deshipu
I ran MicroPython on the D1 Mini Pro, although the amount of available flash is misreported, due to the bug you linked. Otherwise it worked fine. I didn't try with the most recent release, though, it's possible it broke things due to flash autodetection in the esptool.

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Tue Jan 03, 2017 3:09 pm
by blckpstv
I'm not sure if it involves the above problem. But I've still not been able to manage to get a fully flashed Wemos D1 mini pro micropython.

So I'm making the micro-python on for the ESP via this PFalcon and to flash it on a ESP8266 device, it requires me to build a case-sensitive image. I manage to clone and build the [repository](git clone --recursive https://github.com/pfalcon/esp-open-sdk.git). And even managed to make/build it.

From that moment I could go back to the build instruction in the subfolder of the ESP8266 folder in this github here

git submodule update --init worked. But then the make -C mpy-cross doesn't work. So I downloaded the master folder and tried to make the the mpy-cross from that folder. But my thought was, that it has to be in the case sensitive folder.
But even the make -C mpy-cross didn't got me to build it. I got this : Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.

I was able to make it so far with little knowledge of python en and the command line. Really stuck at it.

The make -C ../../../mpy-cross target didn't work as well because there is no top laying folder available in the image.

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Tue Jan 03, 2017 4:30 pm
by Roberthh
So just a few more observation:
Since I do not have a Wemos D1 mini pro, I soldered an 16 MByte flash to an ESP-01 (just stuff from the drawer, easier said than done).
Loading V1.8.6 resulted in the state @blckpstv reported: continuous cycles of reboot & init-message:
Loading V1-8-5 from the download site was possible and gave an REPL prompt.
The load command:

Code: Select all

esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --verify --flash_size=32m 0 esp8266-20161017-v1.8.5.bin
The available flash is 4 MByte.
setting flash_size=detect gives a warning:

Code: Select all

Warning: Could not auto-detect Flash size (FlashID=0x1840ef, SizeID=0x18), defaulting to 4m
It looks like esptool cannot handle 16MBytes flash - no 128m size allowed, and 1.8.6. fails over the 16MByte flash loaded with an Image for 4MByte flash.
Update: Using a different USB/serial adapter, I could also flash V1.8.6-279 with 'make deploy' and flash_size set to 32m

Re: Has anyone had success?

Posted: Mon Jan 09, 2017 10:08 pm
by blckpstv
pythoncoder wrote: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.

Indeed, the mini works!! I managed to install micropython on it. The Pro doesn't work. Maybe this will be solved or explained in the future.

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Tue Jan 10, 2017 5:24 am
by mcauser
No issues for me flashing MicroPython to a D1 Mini or D1 Mini Pro.
I do not get stuck in any boot loops.

I have not done extended testing, but simple stuff works as expected.
If you would like me to run any code, let me know.

Is there something intensive that I can run which will confirm the full 16MB is in use?

Running the latest esp-open-sdk on a case-insensitive filesystem.
Steps on setting it up here: https://forum.wemos.cc/topic/161/microp ... 6-it-works
Running esptool v1.2.1
MacBook Pro 15" with OS X El Capitan 10.11.6

D1 Mini uses CH304G usb serial driver and is found on my MacBook as /dev/tty.wchusbserial1410 (or 1420)
Driver here: https://www.wemos.cc/downloads

D1 Mini Pro uses CP1204 usb driver and is found on my MacBook as /dev/tty.SLAB_USBtoUART
Driver here: https://www.silabs.com/products/mcu/Pag ... ivers.aspx

Flash custom build:

Code: Select all

cd micropython
git pull
cd mpy-cross
make
cd ../esp8266
make clean
make axtls
make PORT=/dev/tty.SLAB_USBtoUART erase_flash
make PORT=/dev/tty.SLAB_USBtoUART -fm dio -fs 32m deploy
Flash precompiled firmware:

Code: Select all

wget http://micropython.org/resources/firmware/esp8266-20170108-v1.8.7.bin
esptool.py -p /dev/tty.SLAB_USBtoUART write_flash -fm dio -fs 32m 0 esp8266-20170108-v1.8.7.bin

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Tue Jan 10, 2017 1:38 pm
by blckpstv
Running the latest esp-open-sdk on a case-insensitive filesystem.
Steps on setting it up here: https://forum.wemos.cc/topic/161/microp ... 6-it-works
Running esptool v1.2.1
MacBook Pro 15" with OS X El Capitan 10.11.6
I followed this but my directory listing in the esp-open-sdk on the case-sensitive image, gives me another listing where I can't cd in to micropython or mpy_cross. Should I build the main micro python git instead of the pfalcon example.


Following 'problem', I've confirmed a good flash via the docs. But when I

Code: Select all

import webrepl_setup
nothing happens. I should get a guide to installing the setup but I just get a new line : >>>

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Tue Jan 10, 2017 11:42 pm
by mcauser
@blckpstv the esp-open-sdk is the only repo affected by case sensitivity.
I cloned/compiled esp-open-sdk on the case sensitive virtual disk but cloned/compiled micropython on a normal folder my regular hard disk.
ie.
/Volumes/case-sensitive/esp-open-sdk/
~/Dev/micropython/

mpy_cross and esp8266 live in the micropython dir.

Once you have the esp open sdk built, you rarely need to rebuild it. Same with esptool.py
Most of the time it is just pulling the latest from the micropython repo, erasing flash, compiling and deploying (writing flash).

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Sun Jan 15, 2017 9:38 am
by blckpstv
mcauser wrote:@blckpstv the esp-open-sdk is the only repo affected by case sensitivity.
I cloned/compiled esp-open-sdk on the case sensitive virtual disk but cloned/compiled micropython on a normal folder my regular hard disk.
ie.
/Volumes/case-sensitive/esp-open-sdk/
~/Dev/micropython/

mpy_cross and esp8266 live in the micropython dir.

Once you have the esp open sdk built, you rarely need to rebuild it. Same with esptool.py
Most of the time it is just pulling the latest from the micropython repo, erasing flash, compiling and deploying (writing flash).
Hmm, I think I'm missing the concept of how it works... I thought everything has to be in the esp-open-sdk to be able to flash it on the Wemos. Also I've no clue how if the normal micro python and the esp-open-sdk are linked to each other.

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Sun Jan 15, 2017 11:00 am
by mcauser
MicroPython is a slim version of python, optimised to run on micro controllers and esp-open-sdk is a tool only used by the esp8266 port of MicroPython. If you are running MicroPython on an ARM CPU, such as the pyboard, you don't even need esp-open-sdk. It's a separate tool with it's own directory.

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Mon Jan 16, 2017 4:30 pm
by blckpstv
Roberthh wrote:So just a few more observation:
Update: Using a different USB/serial adapter, I could also flash V1.8.6-279 with 'make deploy' and flash_size set to 32m
I'm doing this with an normal usb cable, but I think that doesn't really matter, because the wemos has an usb port available for uploading code.