ESP01 MicroPython install

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
kodefoo
Posts: 10
Joined: Wed Sep 21, 2016 3:56 am

ESP01 MicroPython install

Post by kodefoo » Wed Sep 21, 2016 4:11 am

Hello! This is my first post. I've been doing some experimenting with an ESP01 board from Addicore (http://www.addicore.com/ESP8266-ESP-01-p/130.htm). I would like to get MicroPython running on this board if possible, but I'm running into some trouble. I've flashed the latest v1.8.4 firmware, but I can't connect to the ESP01 serially and I do not see the AP running either. The ESP01 is connected to a Windows PC via an arduino uno.

Here is what I have done.
1) Erased flash with esptool
>esptool -p COM5 erase_flash
esptool.py v1.1
Connecting...
Erasing flash (this may take a while)...

No output after the above line saying Erasing flash FYI.

2) Flashed new firmware
>esptool.py --port COM5 --baud 115200 write_flash --flash_size=8m 0 esp8266-20160909-v1.8.4.bin
esptool.py v1.1
Connecting...
Running Cesanta flasher stub...
Flash params set to 0x0020
Writing 565248 @ 0x0... 565248 (100 %)
Wrote 565248 bytes at 0x0 in 48.1 seconds (94.1 kbit/s)...
Leaving...

This seemed to work fine with no errors, but after the flash I'm getting a blue light on the ESP01 and the following output over serial.
Fatal exception (28):
epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x0 0000000

This repeats over and over until I power cycle the ESP01. After the power cycle the unit has the usual red light lit and will not respond to any input even after moving it out of boot loading mode.

Any suggestions would be greatly appreciated.

Thank you!

User avatar
rcolistete
Posts: 125
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil

Re: ESP01 MicroPython install

Post by rcolistete » Wed Sep 21, 2016 5:36 am

MicroPython >= 1.8.1 for ESP8266 needs more than 512KB of flash memory, so ESP-01 doesn't work with.

AFAIK, MicroPython 1.8.0 for ESP8266 sent by email in May 3rd 2016 to ESP8266 Kickstarter supporters would work as it has 493,994 bytes. See the firmware "esp8266-2016-05-03-v1.8.bin" in my host :
http://www.robertocolistete.net/MicroPy ... 3-v1.8.bin
Last edited by rcolistete on Wed Sep 21, 2016 5:23 pm, edited 1 time in total.

User avatar
deshipu
Posts: 1342
Joined: Thu May 28, 2015 5:54 pm

Re: ESP01 MicroPython install

Post by deshipu » Wed Sep 21, 2016 6:59 am

Actually there are ESP-01 modules with 1MB memory, on which MicroPython works just fine. But it won't fit on the 512kB ones.

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

Re: ESP01 MicroPython install

Post by jms » Wed Sep 21, 2016 8:32 pm

An alternative is to build it with unused features removed such as axtls and drivers for stuff you don't have. Study the map to work out how feasible this is with current versions.

markxr
Posts: 62
Joined: Wed Jun 01, 2016 3:41 pm

Re: ESP01 MicroPython install

Post by markxr » Wed Sep 21, 2016 8:36 pm

If you have 512k flash, then there won't be enough room for a filesystem, so I suppose, we should build a version of Micropython for the ESP8266 without the filesystem and that may save enough space to fit in 512k?

Of course you then need to store your app in the scripts/ directory to be built with the image.

User avatar
deshipu
Posts: 1342
Joined: Thu May 28, 2015 5:54 pm

Re: ESP01 MicroPython install

Post by deshipu » Wed Sep 21, 2016 8:45 pm

The filesystem is created at first boot after flashing, and only if there is room for it, so you don't have to disable it.

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

Re: ESP01 MicroPython install

Post by mcauser » Thu Sep 22, 2016 2:28 am

+1 for making drivers configurable.

It would be great to be able to save space when compiling by toggling features you won't need, such as DHT, NeoPixel, APA102, berkeley db, etc.

eg. pfalcon's esp8266: Make APA102 driver inclusion configurable.
https://github.com/micropython/micropyt ... fc828217b6

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

Re: ESP01 MicroPython install

Post by Roberthh » Thu Sep 22, 2016 5:29 am

Even if that shounds harsh: dont't waste your time on a 512k ESP-01. Use it as it is as a modem, if you like, and get one with larger flash for MicroPython.

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: ESP01 MicroPython install

Post by mad474 » Thu Sep 22, 2016 7:08 am

@Roberthh: Sorry, but I don't agree. For the sake of sustainability and for the "Micro" in MicroPython I would (and will) continue to invest efforts in ESP-01 (even if the 512k version may get deprecated - I still have tons, well, tens of them in the field).

Easy feature (and size) configurability would be very much appreciated!

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: ESP01 MicroPython install

Post by platforma » Thu Sep 22, 2016 8:22 am

Your best bet would be, as jms said, disabling features if you want to squeeze into the ESP-01. Good starting points are esp8266/mpconfigport.h and the Makefile of course. I agree with the need for a config tool (something similar to linux/crosstool-NG UI perhaps) but reading the Makefile should provide a good idea of what's compiled and linked into the final image, and then you can follow on and disable what you need.

Post Reply