Compatibility layer for Adafruit CircuitPython drivers on Micropython
Posted: Wed Mar 07, 2018 2:43 pm
As many of you know, CircuitPython is an Adafruit-commissioned remix of Micropython.
I don't speak for Adafruit, but I understand the differences are about being more accessible and easy for learners (sometimes at the cost of performance or relevance for 'industrial' use cases). Currently CircuitPython is maintained for the target platforms which Adafruit ships (see https://github.com/adafruit/circuitpython/releases ) meaning there are Micropython platforms for which no CircuitPython build is available.
Alongside CircuitPython, Adafruit supports learners also by commissioning and maintaining a whole load of hardware drivers (see e.g. https://github.com/adafruit/Adafruit_Ci ... es/drivers ) which do not run on Micropython, and which would need specialist work to fork a Micropython flavour.
Adafruit commissioned some of my time to experiment with a proof-of-concept compatibility layer, called adafruit-blinka ( the name of the CircuitPython snake https://www.adafruit.com/product/2600 ) which might allow CircuitPython driver code to run directly on a Micropython official build. Assuming your application can accept the marginal increase in RAM, flash and processor overhead, a stable compatibility layer would give Micropython users the benefit of using tested CircuitPython modules without modification.
This is just an informal announcement that early experimentation is positive. I have learned it may be possible to run nearly all CircuitPython code on a Micropython official build, with several drivers having been proven to work with the proof-of-concept compatibility layer. At this stage, interested experimenters working in education who are willing to put up with very beta code might be able to offer feedback or contributions to achieve the CircuitPython conformance which they need for their projects on Micropython platforms.
Currently, there is support for Pin enumeration, I2C and UART support, but as-yet-untested SPI support. You can engage with the public Github repo at https://github.com/adafruit/Adafruit_Micropython_Blinka
I don't speak for Adafruit, but I understand the differences are about being more accessible and easy for learners (sometimes at the cost of performance or relevance for 'industrial' use cases). Currently CircuitPython is maintained for the target platforms which Adafruit ships (see https://github.com/adafruit/circuitpython/releases ) meaning there are Micropython platforms for which no CircuitPython build is available.
Alongside CircuitPython, Adafruit supports learners also by commissioning and maintaining a whole load of hardware drivers (see e.g. https://github.com/adafruit/Adafruit_Ci ... es/drivers ) which do not run on Micropython, and which would need specialist work to fork a Micropython flavour.
Adafruit commissioned some of my time to experiment with a proof-of-concept compatibility layer, called adafruit-blinka ( the name of the CircuitPython snake https://www.adafruit.com/product/2600 ) which might allow CircuitPython driver code to run directly on a Micropython official build. Assuming your application can accept the marginal increase in RAM, flash and processor overhead, a stable compatibility layer would give Micropython users the benefit of using tested CircuitPython modules without modification.
This is just an informal announcement that early experimentation is positive. I have learned it may be possible to run nearly all CircuitPython code on a Micropython official build, with several drivers having been proven to work with the proof-of-concept compatibility layer. At this stage, interested experimenters working in education who are willing to put up with very beta code might be able to offer feedback or contributions to achieve the CircuitPython conformance which they need for their projects on Micropython platforms.
Currently, there is support for Pin enumeration, I2C and UART support, but as-yet-untested SPI support. You can engage with the public Github repo at https://github.com/adafruit/Adafruit_Micropython_Blinka