no built in lib releases after updating circuitpython

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
farstox
 
Posts: 7
Joined: Sat Jan 08, 2022 1:31 am

no built in lib releases after updating circuitpython

Post by farstox »

I updated my trinket m0 from circuitpython 2(I think?) to 7.1.1 from here via the instructions here, and in doing so it seems to have wiped everything out of the lib/ directory, and all of the sample code from the root directory. I downloaded the library bundle from here and while some of those were what I was looking for, the trinket doesn't have anywhere near enough space to hold all of those dependencies, and I'm failing to find out which of them if any has the ulab numpy implementation. It also seems like the neopixel release from that bundle uses standard python lists rather than numpy lists, though i'm not sure if thats true of all circuitpython neopixel implementations.
Where can I download the dependencies that were supposed to be built in? and/or what am I doing incorrectly that is resulting in the built in dependencies not being installed when I flash new firmware?
thanks in advance!

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: no built in lib releases after updating circuitpython

Post by dastels »

First, what do you mean by built-in dependencies. There are modules that are implemented in C as part of the CircuitPython runtime. Which are available depend on the board. The M0 boards, especially the Trinket and Gemma, don't support much due to their relatively small memories. You can find out what internal modules are included for eachboard at https://circuitpython.readthedocs.io/en ... atrix.html. There aren't, to my knowledge, python alternatives for the internal modules.

Dave

User avatar
farstox
 
Posts: 7
Joined: Sat Jan 08, 2022 1:31 am

Re: no built in lib releases after updating circuitpython

Post by farstox »

maybe I'm just misunderstanding, but I had thought that the m0 firmware had a few precompiled .mpy modules on a fresh install that would be present like they were on my first boot. Part of what confused me is I saw neopixel_write listed on https://circuitpython.org/board/trinket_m0/ under "Built-in modules available" and thought it was just the full neopixel library which I had to copy over myself.

But really, even if there isn't, I'm mostly trying to figure out if
1) there's a release of neopixel out there somewhere that uses ulab's numpy implementation that I could hopefully download and
2) where I could get a ulab release thats compatible with circuitpython, since on ulab's github page they say that ulab is included in the main circuitpython repo https://github.com/v923z/micropython-ulab#compiled . It seems like it WOULD be considering how much documentation there is for it on adafruit.com and circuitpython's docs

I'm trying to avoid building from source because I only barely understand the different parameters going into that build and what matters and what doesn't and I'm sure i'll stumble all over it if I tried.

User avatar
farstox
 
Posts: 7
Joined: Sat Jan 08, 2022 1:31 am

Re: no built in lib releases after updating circuitpython

Post by farstox »

sorry, I'm coming from a backend software engineer with little to no embedded experience here, to explain any weirdness in that answer

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: no built in lib releases after updating circuitpython

Post by dastels »

The builtin neopixel_write module is the hardware oriented bit of using a neopixel. It takes care of generating and sending the data stream to the connected pixels.

As for ulab being a builtin module in CircuitPython:
CircuitPython for SAMD51 and nRF microcontrollers
You're using a Trinket M0, so there;'s no builtin ulab. Generally if a builtin module isn't included in the build for a specific board, it's because of memory limitations. I.e. it doesn't fit. That could be due to the size of the code vs how much flash there is, or the RAM overhead of the module. The M0 is pretty low on RAM.

So if you want to use ulab you'll need to switch to a SAMD51 (aka M4) or nRF (i.e. nRF52840) board. There are also some other options (e.g. esp32-s2 boards). You can get the complete list: https://circuitpython.readthedocs.io/en ... ilter=ulab

I don't see anything for a ulab-ified neopixel module, but feel free to port the neopixel module to use ulab. The code is at https://github.com/adafruit/Adafruit_Ci ... n_NeoPixel. But, again, you'll need a more capable MCU.

Dave

User avatar
farstox
 
Posts: 7
Joined: Sat Jan 08, 2022 1:31 am

Re: no built in lib releases after updating circuitpython

Post by farstox »

ah, that clears things up. Thanks a lot for the explanation, and for the compatibility matrix link thats super helpful.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”