-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ATECC and LSM6DS firmwares for Arduino Nano 33 IoT #2675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
the LSM6DS makes some sense but since we wont be getting the WiFi working, we don't know that the ATECC/binascii makes sense to include, there's not a lot of space on these SAMD21 chips :) |
Hello @ladyada, not sure if it's the best way to do multiple firmwares, but it's the simplest I found. ATECC is a cryptochip, it can be use for other things that securing WiFi, like.. a cryptokey :-) |
OK - we don't have U2F support at this time |
Could you give some background why you are wanting this? I really dislike multiple board definitions for the same board because it is confusing. |
Hello @tannewt, I completely agree with you, I don't like the concept as it's the same board. Why I need it for the Nano IoT is because its RAM and Flash limitations. Not possible to import all the libs needed to use LSM6DS in RAM, we need them as frozen modules. But frozen module take place in the flash with few space left for user code, so LSM6DS + ATECC libs could not be the best thing for everybody. My "vision" is:
The circuitpython website is generated from the boards, so all this flavors will be easily downloadable for users. |
It lacks flavors because we don't want to have different flavors for a single board. (The only one we do is the CircuitPlayground Express and it is hopefully the last one.)
How much space is left? I'd much rather make the libraries smaller than create different flavors of a single board. That way all users of the library will benefit. One optimization of the LSM6DS would be to comment out all bits that are unused by the driver. For example, |
I tried stripped down the libs (by exemple remove |
Did you try stripping down LSM6DS? I think there are a lot of unnecessary RWBits that can be commented out and merged into mainline. |
No I haven't tried it, as I'm not an Adafruit paid developer, I'm just looking for a working and simple solution |
Ok, I've taken a glance this and I agree we need to freeze some of these libraries in. The SAMD21 is just too small to fit both ATECC and LSM6DS in memory. I still don't want multiple versions for a single board. Multiple versions are a long term support burden that I'm not willing to commit to. So, my preference would be to always freeze these two libraries and bus device in because both chips are on the board. There is no need to freeze the binascii library in because the built in version can be enabled with Rotaryio, usb_hid and usb_midi could be turned off to make space in the build as well. I wouldn't reduce the filesystem size because it is already very small. |
I agree, if we should have only one board it's the best fit
I don't know about it, if it exists, is smaller and faster, why isn't it already enabled ?
The documentation says that Rotayio doesn't support SAMD21 |
Because it still takes up space. For builds that don't use it, it is smaller to omit it. In this case we should enable it instead of freezing in the Python version since we want it.
It's worth double checking. I'm not sure the docs are correct. I was basing its inclusion in small builds based on the line here: https://github.com/adafruit/circuitpython/blob/master/py/circuitpy_mpconfig.mk#L230 |
@fgallaire Want to try adding these as frozen soon? I fixed turning off USB_HID and USB_MIDI so they free up more space in my #2685 PR which will hopefully be 8000 merged soon. |
I looked into this again today and it simply can't be done easily. My changes are here: https://github.com/tannewt/circuitpython/tree/arduino_nano_atecc I've also opened a PR to add a note on circuitpython.org about it. adafruit/circuitpython-org#487 |
@tannewt why are you afraid by a fixed problem ? |
@fgallaire I'm not sure what you mean by it being fixed or "iso". |
@tannewt "iso" was the probably wrongly named generated firmware. |
@fgallaire I couldn't fit the libraries in the firmware. I didn't want to reduce the filesystem size because 64k is already very tight for user code. |
No description provided.