Closed
Description
Rerunning BMI270 test sketches on the Sense is showing failing to start the BMI270 using the Sparkfun library so ran the Arduino BMI270-BMM150 library in debug mode.
Now getting the following error:
[00:00:08.562,713] �[1;31m<err> llext: Failed to allocate extension symbol table, ret -12�[0m
Activity
pillo79 commentedon Apr 14, 2025
Unfortunately -12 is
ENOMEM
so it means theLLEXT_HEAP_SIZE
was not big enough to load the sketch. Can you try varying that to see if it improves?mjs513 commentedon Apr 14, 2025
Sorry didn't error didn't register yesterday - probably because GIGA stuff had me crazy.
Anyway changed llext_heap_size to 128 from 96 and that seems to have fixed it so that we don't get that error anymore. Now sure what happened that not the BMI270 isn;t working with the sparkfun lib. With the Arduino version it says started but not seeing any data so something is up. Have to dig but may wait to dig into the libraries.
You want a PR for the change?
mjs513 commentedon Apr 15, 2025
@pillo79 - @facchinm
Even after making the the BMI270 was failing to start as I mentioned. But found something interesting. After uploading the sketech I will get Device not found error. But if I re-burn the bootloader the sketch starts and runs correctly:
Also works if I upload the sketch after I do a double of the reset button???
Of course if I power off and power on I get back to not finding the BMI270???? Unless I leave it off for 10 or more seconds - go figure!!!!!!
EDIT: Forgot to mention I am using the sparkfun BMI270 library.
mjs513 commentedon Apr 15, 2025
@pillo79 - @facchinm - @KurtE
Did finally get the Arduino_BMI270_BMM150 library working with Zephyr. But again strange things happen.
If I cycle power I will get good data"
Here is the modified library if you want to try.
Arduino_BMI270_BMM150.zip
Just using the accelerometer sketch to test with.
mjs513 commentedon Apr 16, 2025
Was experimenting a little more with this and begining to think there is some sort of memory issue.
While a basic sketch appears to work to get the IMU data after a power cycle - think the issue is the BMI270 since the BMM150 seems to always work and give good data.
Now if I try to add in the MadgwichAHRS library I loose serial (Com port). If I enter debug mode and I type sketch in the serial monitor nothing shows in either the Serial Monitor or on Serial1.
More fun.
EDIT: Using @KurtE;s trick of typing sketch in Serial1 found the issue is probably another item has to be added to llexte_exports.c. Have to add atan2f.
UPDATE: see Llext heap fix for nano33 and Fixes for LLEXT_EXPORTS.C #109
that resolves issues with atan2f
mjs513 commentedon Apr 26, 2025
Retested with the latest changes just posted and still seeing the same isssue in #106 (comment)
facchinm commentedon Apr 28, 2025
@mjs513 I just retested and it looks fine after applying arduino-libraries/Arduino_BMI270_BMM150#51 .
Will check on a clean installation this afternoon
mjs513 commentedon Apr 28, 2025
@facchinm
Pretty much made the same changes in my version of the library - but to be consistent I just made the same changes you made and reran my combined sensor (BMM150+BMI270). Note: updated to lastest core changes less the USB Fixes PR which is still open.
on first upload I am seeing incorrect data from the BMM270:
powering off for several seconds and the powering on I see the correct data
that is the problem I am really seeing.