New *early access* mp-esp8266-firmware-vXY.bin on ESP8266

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Damien
Site Admin
Posts: 619
Joined: Mon Dec 09, 2013 5:02 pm

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by Damien » Mon Mar 14, 2016 4:44 pm

Regarding "import boot_" and creating a filesystem: The filesystem is created starting at offset 655360 in the flash... so that means you need more than 512k of flash for it to work. ESP-01 modules with only 512k flash won't work!

Regarding running code on boot up: no, there is no way at the moment to do this. As @deshipu points out, you need to have a filesystem mounted as the first step, then the firmware must look in that filesystem for the user boot.py file. This feature needs to be hardcoded.

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

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by mad474 » Mon Mar 14, 2016 4:53 pm

Damien wrote:The filesystem is created starting at offset 655360 in the flash... so that means you need more than 512k of flash for it to work. ESP-01 modules with only 512k flash won't work!
That was my assumption. Thanks for clarifying!
(It's your week-off, isn't it :))
Last edited by mad474 on Mon Mar 14, 2016 6:09 pm, edited 1 time in total.

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

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by mad474 » Mon Mar 14, 2016 5:34 pm

mpymike wrote:How do you find out what the manufacturer and device codes are?
Turn your esp in to flash mode and run

Code: Select all

$ esptool.py --port /dev/ttyUSB0 flash_id
(or use your differing port)
and you'll get something like

Code: Select all

Connecting...
Manufacturer: e0
Device: 4014
IIRC to find out the flash size in kbytes: Take the last 2 digits of device output as exponent to the base of 2 and divide it by 16.
In this case:

Code: Select all

>>> 2**14/16
1024.0
But I may be wrong ... so it needs confirmation.

To find out more and also look up the manufacturer company please refer to https://github.com/themadinventor/espto ... i-flash-id.

Unfortunately the case "Manufacturer: e0" is not mentioned in that flashrom source code (flashchips.h). So you might find the manufacturer over here (needs registration): https://www.jedec.org/standards-documen ... omy%3A3268.

PS: Beware of nominal values! To be really sure about flash size you may want to run your own evaluation program.

mpymike
Posts: 10
Joined: Mon May 26, 2014 5:48 am

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by mpymike » Tue Mar 15, 2016 8:56 pm

Thanks

My ESP-01's seem to use 8Mbit flash (BergMicro 25Q80 with device_id 4014). So it should be big enough.
Could it be that the bin needs >8Mbit for boot_ to work?

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

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by platforma » Wed Mar 16, 2016 8:20 pm

I guess we can carry on using this thread to discuss the new firmware update v02. Maybe change the name accordingly.
It's good to see the filesystem built in now! The first thing I issued on the repl (out of habit now), is "import boot_", which immediately resulted in:

Code: Select all

FAT filesystem appears to be corrupted. If you had important data there, you
may want to make a flash snapshot to try to recover it. Otherwise, perform
factory reprogramming of MicroPython firmware (completely erase flash, followed
by firmware programming).
...
Every time if I do a clean flash and "import boot_" I get the error msg. I don't know if boot_ is still relevant and left on purpose or by mistake.

The second thing that happened is another exception, now issuing os.listdir(), without the '/' root. This only happened once and after a reboot everything went back to normal and the file that I wrote was present:

Code: Select all

>>> import os
>>> os.listdir()
Fatal exception 28(LoadProhibitedCause):
epc1=0x4024bd15, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000001c, depc=0x00000000

 ets Jan  8 2013,rst cause:2, boot mode:(1,2)
If this is all irrelevant, that's no problem. Just thought i'd let you know.

mpymike
Posts: 10
Joined: Mon May 26, 2014 5:48 am

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by mpymike » Wed Mar 16, 2016 8:46 pm

I too had similar problems with v02.

It might be useful to list the device_id (eg 4014) and the flash memory chip part number if you can read it.

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

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by platforma » Wed Mar 16, 2016 8:56 pm

Hi mpymike. Yeah, I have read your posts as well, but I should have included the info in the previous post. It's an 12E model. I am fairly certain it has 4Mbyte memory. The thing is, it's working fine if I don't try to import as the first command I run, and I can read/write files with no problem.

Code: Select all

Manufacturer: c8
Device: 4016

skylin008
Posts: 54
Joined: Wed Mar 11, 2015 6:21 am

micropython esp8266 latest version help() errror

Post by skylin008 » Thu Mar 17, 2016 8:54 am

I used the ESP-12F module .when run,show follows error message:
could not find module 'boot
>>>
MicroPython v1.6-235-g2466cb6-dirty on 2016-03-17; ESP module with ESP8266
Type "help()" for more information.
>>> #4 ets_task(40100470, 3, 3fff8a04, 16)
ets_alt_task: ets_run
q for task 3: queue: 3fff8a04, get ptr: 0, put ptr: 0, qlen: 16
q for task 20: queue: 3ffef760, get ptr: 0, put ptr: 0, qlen: 3
q for task 29: queue: 3fff9390, get ptr: 0, put ptr: 0, qlen: 10
q for task 31: queue: 3ffeea10, get ptr: 0, put ptr: 0, qlen: 4
q for task 32: queue: 3ffef9d0, get ptr: 0, put ptr: 1, qlen: 34
====

>>> help()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name not defined
>>> import os
>>> import boot_
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: module not found
>>>

How fix this issue?Thanks advance!

---
Modnote: Merged with the firmware discussion thread.


User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by kfricke » Thu Mar 17, 2016 9:14 am

platforma wrote:The second thing that happened is another exception, now issuing os.listdir(), without the '/' root. This only happened once and after a reboot everything went back to normal and the file that I wrote was present:

Code: Select all

>>> import os
>>> os.listdir()
Fatal exception 28(LoadProhibitedCause):
epc1=0x4024bd15, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000001c, depc=0x00000000

 ets Jan  8 2013,rst cause:2, boot mode:(1,2)
If this is all irrelevant, that's no problem. Just thought i'd let you know.
I have encountered the same error when first calling the os.listdir() method!

User avatar
thoralt
Posts: 8
Joined: Wed Jul 02, 2014 11:22 am
Location: Germany

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by thoralt » Fri Mar 18, 2016 8:16 am

I've played around with alpha 2 a bit and focused on the Neopixel module. I'm running Micropython on an ESP-07 and the chip is driving all LEDs correctly on GPIO0, GPIO2, GPIO4, GPIO5, GPIO12, GPIO13, GPIO14 and GPIO15.

However, it is _not_ outputting any data on GPIO16. I verified this by using a scope. To ensure the pin was initialized correctly and is still alive I used several pin.high() and pin.low() which showed up on the scope as intended. Using the same pin object with the Neopixel module simply does nothing. Is this hardware related or could this be a bug in the firmware?

Thoralt

Locked