BMI270 sensor library is HUGE won't compile on UNO?

HI All,

I feel i must be really mis-understanding something and I hope someone can help me out.

I have just purchased a BMI270 accel and gyro sparkfun breakout.

PART:

Online its says compatible with all platforms.
https://docs.arduino.cc/libraries/sparkfun-bmi270-arduino-library/

I am trying to use it with the suggested sparkfun library and an Arduino UNO. I have a qwiic to pin header cable.

Library:
SparkFun_BMI270_Arduino_Library.h

running example:
Example01_BasicReadingsI2C.ino

Unfortunately there seem to be 8K of variables required to set this up and I get this error when compiling:

Global variables use 9844 bytes (480%) of dynamic memory, leaving -7796 bytes for local variables. Maximum is 2048 bytes.
data section exceeds available space in board

Compilation error: data section exceeds available space in board

There are also a ton of bit shift warnings and macro expansion warnings – but i don’t think they are blocking the library use.

Arduino/libraries/SparkFun_BMI270_Arduino_Library/src/bmi270_api/bmi2.c:7288:37: note: in expansion of macro ‘BMI2_EXT_SENS_SEL’
if (dev->sens_en_stat & BMI2_EXT_SENS_SEL)

Libraries/SparkFun_BMI270_Arduino_Library/src/bmi270_api/bmi2_defs.h:527:58: warning: left shift count >= width of type [-Wshift-count-overflow]
#define BMI2_EXT_SENS_SEL (1 << BMI2_EXT_SENS_SYNC)

Are all of these variable really needed? Is there a lightweight version of the library for this sensor used with an UNO ? Is there a way to leave some of this out ?

I am i doing something wrong that is easily corrected?

Any advice much appreciated. If the fix is really use a different controller (not an UNO) then it would be helpful to remove the all platforms supported claim.

Looks like arduino.cc has some incorrect data.
Found this in the hookup guide:

Attention
The BMI270 chip requires an 8kb file to be flashed to memory on the controller. Make sure that whatever controlling board you use, it has enough space.

There may be a workaround with some additional hardware attached to the uno but that would require modifications to the library.

thanks @YellowDog – i must have missed some fine print – i have the sensor running on rev4.0 minima …

my students unfortunately only have uno’s … will have to sort it on my end.

s

1 Like

Haven’t looked at the library but a possible work around might be to store the 8K firmware the sensor needs in an EEPROM connected to the uno then have your sketch transfer that data to the sensor at startup. That way you’re not storing that 8K of data in the sketch.

interesting suggestion … if i get some time in coming weeks I will look into this as a possible pathway.