-
Notifications
You must be signed in to change notification settings - Fork 21
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
Memory Allocation issue on M0, others? #15
Comments
yeah its a large library - you'll need an M4/nRF for this. that said, there are a few registers that are not used |
Are new libraries tested on M0s? Shouldn't we target the smallest platform for them? Making them small means they'll leave more room for user code on larger platforms as well. It could be worth adding a memory size check to the library CI so it's prevalent how big each is. |
this one was only tested on nrf52 (cause its used in the feather sense & clue) - a memory size check would be nice but not sure how we could calculate that? |
mpy size could be an approximation. I bet we could have mpy-cross actually output it since it loads everything into memory before writing it out to an mpy. Not a simple thing to do though. |
I removed the unused registers but it still doesn't fit on the CPX. @ladyada lmk what if anything else you'd like me to do here |
nope thats a good place to take a break, it may just not fit |
@ladyada I'm un-assigning myself for now until there's something tangible for me to do |
kk |
Just wondering what we would like to do with this issue,I do not have a metro express but this test ok in a QT Py. Adafruit CircuitPython 6.1.0 on 2021-01-21; Adafruit QT Py M0 with samd21e18
>>> import lsm6ds_lsm6ds33_simpletest
Acceleration: X:0.80, Y: 0.83, Z: 9.97 m/s^2
Gyro X:0.05, Y: -0.09, Z: -0.04 radians/s
Acceleration: X:0.81, Y: 0.84, Z: 9.96 m/s^2
Gyro X:0.05, Y: -0.09, Z: -0.04 radians/s
Acceleration: X:0.81, Y: 0.83, Z: 9.96 m/s^2
Gyro X:0.05, Y: -0.09, Z: -0.04 radians/s |
Still hitting the issue on Metro M0 Express: Adafruit CircuitPython 7.2.3 on 2022-03-16; Adafruit Metro M0 Express with samd21g18
>>> import lsm6ds_lsm6ds33_simpletest
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "lsm6ds_lsm6ds33_simpletest.py", line 6, in <module>
File "adafruit_lsm6ds/__init__.py", line 158, in <module>
File "adafruit_lsm6ds/__init__.py", line 190, in LSM6DS
MemoryError: memory allocation failed, allocating 184 bytes
>>> |
i think we just gotta update the readme and guide to say "SAMD21 can't use this advanced IMU" |
Re this thread:
https://forums.adafruit.com/viewtopic.php?f=19&t=164655
And my testing:
The text was updated successfully, but these errors were encountered: