Hi, I am trying to compile an example code for MPU9250 testing and I am getting this error:
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Uno"
In file included from C:\Users\Dell\Dropbox\My PC (DESKTOP-6LMBISA)\Documents\Arduino\libraries\Bolder_Flight_Systems_MPU9250\examples\arduino\i2c\i2c.ino:26:0:
C:\Users\Dell\Dropbox\My PC (DESKTOP-6LMBISA)\Documents\Arduino\libraries\Bolder_Flight_Systems_MPU9250\src/mpu9250.h:36:10: fatal error: cstddef: No such file or directory
#include <cstddef>
^~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
If one googles "Arduino include cstddef" there are several threads to be found but I could not identify the reason/ background why this problem popped up... Needs some more investigation (at least one my side;-) )...
do you think including the lib I linked might solve the issue? I am not sure as I would expect that this compilation error should have appeared much more often...
I would guess that Arduino IDE installation or configuration problems could be a reason...?!?
EDIT: IDE and configuration problem seem not to be the issue. I installed Bolder Flight's mpu9250 lib and get the same error when compiling the example. Will try now what happens after installing the lib mentioned above,
EDIT: Found that some more libs from Bolder Flight are required ... Will install them and give it a try ...
EDIT: Think I found it:
TO posted:
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Uno"
Bolder Flight writes:
This library is compatible with Arduino ARM and CMake build systems.
I was finally able to compile the i2c example, but for an ESP32 (dual core ARM processor). The libraries are designed for ARM, You tried to compile for Arduino Uno which uses an Atmega328 microcontroller.
If I am not wrong you have to change to one of the supported(!) ARM types to use this libs ...
EDIT: See also here at the github page of Bolder Flight's mpu9250 lib:
Teensy 3.x, 4.x, and LC devices are used for testing under Arduino and this library should be compatible with other Arduino ARM devices. This library is not expected to work with AVR devices.
For anything other than ESP32 I could not make the example compile (and would like to leave this to people in the forum who have experience with MKR and Due).