Open maholli opened 4 years ago
To build circuitpython, follow the instructions starting here: https://github.com/adafruit/circuitpython/tree/master/ports/atmel-samd#setup
When building CP, there are files that tell the compiler which aspects of MicroPython to include in the build. There are many of these files, which enable much of the modularity of CP/MP. Some of these files are:
To include ulab in the CP build, follow the instructions here. Ignore the first bit about cloning MicroPython (you already did that when you cloned CircuitPython). Pay specific attention to this part:
⭐ Make sure you can build vanilla CircuitPython before trying to add things in. If you've already successfully built CP, then make sure to skip this step for ulab as well:
This issue co-locates a lot of resources for getting started building custom CircuitPython modules as well as specifics about handling large data arrays.
Example modules that use large matrix math
A good starting point might be looking at displayio. Displayio is a core piece of CircuitPython development used to drive complex LCD, OLED, and e-ink displays. This involves storing, manipulating, and refreshing large 2D arrays.
There's also plenty of glue-code that holds it all together and allows you to call things from CircuitPython. You'll get a feel for that by looking at:
Alternatively, good general implementation examples are the various c-modules that make up the "python" functionality.
💡 please jot down your findings as comments to this issue so others can benefit