Previous month in ESP8266 port development...

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Previous month in ESP8266 port development...

Post by pfalcon » Thu Sep 15, 2016 9:36 pm

1.8.4 was released last week, you can read the announcement at the usual place: http://forum.micropython.org/viewtopic.php?f=16&t=2140 .

There're no stretch goals this release brings, and I'd like to talk what I was working on last month. When starting Kickstarter campaign, my personal top goals for it were: a) drive further MicroPython development in general; b) continue getting most of ESP8266, going beyond what's currently known/available. With ESP8266 port work already progressing well MicroPython overall, and the port being in good shape, I decided to dedicate last month to furthering knowledge and insight into ESP8266.

But as you know, only small part of the chip and SDK is documented. Getting further insight requires reverse engineering to achieve further control and interoperability with chip and its firmware. As a firm believer in OpenSource, I consider it's open to use OpenSource tools for the purpose OpenSource reverse-engineering (with the aim of interoperability and community support for hardware devices, essentially, doing vendor's job when it falls short with documentation and support). And there's lack of easy to use and powerful OpenSource tools for RE. So, majority of this month went into improving tools which I started to develop previously (and which were imperative to develop port to its current state).

These are:
  • Interactive retargettable disassembler: https://github.com/pfalcon/ScratchABit . There was significant progress with ScratchABit. It's now close to state I wanted it to be, and suitable for long-time (vs try-once) usage. It took 1.5 years (of intermittent work) to get it to that state.
  • There're also noticeable progress with my decompilation framework https://github.com/pfalcon/ScratchABlock . However, it's such mind-boggling task for single person to perform, then it's hard to say when there will be wide practical outcome of that work (but that's essentially a life-time project).
  • As a side project, there's noticeable improvement to picotui library: http://forum.micropython.org/viewtopic.php?f=15&t=2347 . This serves as a UI library for ScratchABit, and can be used to create UI for MicroPython projects (unix port).
So, with a lot of effort and noticeable progress with tools, there's not much practical outcome of that work so far. Actually, as a testcase for practicality, I went to study WDT working and as a result, basic machine.WDT class was implemented (which was recurring request). There was more knowledge about WDT collected than currently implemented in machine.WDT, but that yet need to be experimented/expressed in usable code yet.

There was actually progress on stretch goals too - support for stream decoding of zlib format was added to uzlib module, that being prerequisite for supporting upip to run on low-memory ports like ESP8266. There're bunch more work to do to make that a reality though.

Next month I have business travel, though probably there won't be much progress too (which prompted to write this report). However, the plan is to continue working on upip stretch goal, and then on uasyncio stretch goal.

Anyway, that's progress report just for me. Stay tuned for cool features implemented by Damien, and contributed by the regular forum participants, there now being steady stream covering various white spots in ESP8266 functionality.

Thanks for your support!
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

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

Re: Last month in ESP8266 port development...

Post by deshipu » Fri Sep 16, 2016 7:51 am

Thank you for the update. I think that time devoted to sharpening the axe is usually time very well invested, I can't wait to see what this will bring.

Are your findings about ESP8266's watchdog documented anywhere? It would be interesting to look at them, even if they are way over my head. You know, I kind of paid for it, so I would like to see it.

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

Re: Last month in ESP8266 port development...

Post by markxr » Fri Sep 16, 2016 9:39 pm

This wifi .scan() bug was really weird, I will check if my applications work better after this fix.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Last month in ESP8266 port development...

Post by pfalcon » Sat Sep 17, 2016 1:28 pm

deshipu wrote:Are your findings about ESP8266's watchdog documented anywhere? It would be interesting to look at them, even if they are way over my head. You know, I kind of paid for it, so I would like to see it.
I submitted few "low-hanging" findings to esp-open-rtos project, which is by now provides the most complete headers for esp8266 registers, etc.: https://github.com/SuperHouse/esp-open- ... s%3Aclosed . The one about WDT has additional info from other folks. There's more than that, but it's at best in "thoughtsteam" and "random hunches" form. For example, there's clearly a register to set watchdog duration, but exponentially, as a power of 2. But maybe it's actually can be set as m * 2^n. Then there's also WDT interrupt (besides an expected WDT reset, though I leave possibility there's no real reset). That somehow reminds me of "windowed WDT", but fairly speaking, it was long ago since I read about them, so I'd need to look at a couple of datasheets for other MCUs to avoid talking nonsense.

So, there's nothing "over the top" per se, just a lot of vague facts which need to be put together and verified before something specific can be said.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

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

Re: Previous month in ESP8266 port development...

Post by deshipu » Sat Sep 17, 2016 7:12 pm

This is still great, thank you!

User avatar
ernitron
Posts: 89
Joined: Fri Jun 03, 2016 5:53 pm
Location: The Netherlands

Re: Previous month in ESP8266 port development...

Post by ernitron » Tue Sep 27, 2016 7:43 pm

Pfalcon (Paul) I want to state here clear and loud: without you the ESP8266 know how, development, advancement and community (not only micropython) would not exist. Thank you.

Erni

Post Reply