Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.
0

no built in lib releases after updating circuitpython
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

no built in lib releases after updating circuitpython

by farstox on Sun Jan 16, 2022 4:04 pm

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!

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

Re: no built in lib releases after updating circuitpython

by dastels on Sun Jan 16, 2022 7:18 pm

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/latest/shared-bindings/support_matrix.html. There aren't, to my knowledge, python alternatives for the internal modules.

Dave

dastels
 
Posts: 9774
Joined: Tue Oct 20, 2015 3:22 pm

Re: no built in lib releases after updating circuitpython

by farstox on Mon Jan 17, 2022 12:46 am

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.

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

Re: no built in lib releases after updating circuitpython

by farstox on Mon Jan 17, 2022 1:12 am

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

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

Re: no built in lib releases after updating circuitpython

by dastels on Mon Jan 17, 2022 10:32 am

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/latest/shared-bindings/support_matrix.html?filter=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_CircuitPython_NeoPixel. But, again, you'll need a more capable MCU.

Dave

dastels
 
Posts: 9774
Joined: Tue Oct 20, 2015 3:22 pm

Re: no built in lib releases after updating circuitpython

by farstox on Tue Jan 18, 2022 1:59 am

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

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

Please be positive and constructive with your questions and comments.