This fails to compile the MPU9250 example using this library with either SPI or I2C examples.
It seems to be unhappy about the round macro .
Here is the log from the Compiler
Arduino: 1.8.19 (Linux), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), Serial, 72Mhz (Normal), Smallest (default)"
In file included from /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish.h:63:0,
from /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/Arduino.h:30,
from sketch/spi.ino.cpp:1:
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/MathFunctions.h:1389:51: error: expected unqualified-id before 'const'
inline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x)
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/MathFunctions.h:1389:51: error: expected ')' before 'const'
inline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x)
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/MathFunctions.h:1389:51: error: expected ')' before 'const'
inline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x)
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
In file included from /home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/Core:172:0,
from /home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/eigen.h:36,
from /home/user/Arduino/libraries/Bolder_Flight_Systems_MPU9250/src/mpu9250.h:38,
from /home/user/Arduino/libraries/Bolder_Flight_Systems_MPU9250/examples/arduino/spi/spi.ino:26:
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/GenericPacketMath.h: In function 'Packet Eigen::internal::pround(const Packet&)':
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/GenericPacketMath.h:826:48: error: 'Eigen::numext::round' has not been declared
Packet pround(const Packet& a) { using numext::round; return round(a); }
^
In file included from /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish.h:63:0,
from /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/Arduino.h:30,
from sketch/spi.ino.cpp:1:
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/Half.h: At global scope:
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/Half.h:732:50: error: expected unqualified-id before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half round(const half& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/Half.h:732:50: error: expected ')' before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half round(const half& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/Half.h:732:50: error: expected ')' before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half round(const half& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/BFloat16.h:564:54: error: expected unqualified-id before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/BFloat16.h:564:54: error: expected ')' before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/BFloat16.h:564:54: error: expected ')' before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/functors/UnaryFunctors.h: In member function 'const Scalar Eigen::internal::scalar_round_op::operator()(const Scalar&) const':
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:33: error: expected unqualified-id before '(' token
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/functors/UnaryFunctors.h:798:106: note: in expansion of macro 'round'
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::round(a); }
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h: At global scope:
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:36: error: expected unqualified-id before ')' token
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h:467:1: note: in expansion of macro 'round'
round() const
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:37: error: expected ')' before '>=' token
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h:467:1: note: in expansion of macro 'round'
round() const
^
Multiple libraries were found for "Wire.h"
Used: /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/libraries/Wire
Not used: /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/libraries/WireSlave
exit status 1
Error compiling for board Generic STM32F103C series.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
This fails to compile the MPU9250 example using this library with either SPI or I2C examples.
It seems to be unhappy about the round macro .
Here is the log from the Compiler
Arduino: 1.8.19 (Linux), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), Serial, 72Mhz (Normal), Smallest (default)"
In file included from /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish.h:63:0,
from /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/Arduino.h:30,
from sketch/spi.ino.cpp:1:
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/MathFunctions.h:1389:51: error: expected unqualified-id before 'const'
inline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x)
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/MathFunctions.h:1389:51: error: expected ')' before 'const'
inline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x)
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/MathFunctions.h:1389:51: error: expected ')' before 'const'
inline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x)
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
In file included from /home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/Core:172:0,
from /home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/eigen.h:36,
from /home/user/Arduino/libraries/Bolder_Flight_Systems_MPU9250/src/mpu9250.h:38,
from /home/user/Arduino/libraries/Bolder_Flight_Systems_MPU9250/examples/arduino/spi/spi.ino:26:
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/GenericPacketMath.h: In function 'Packet Eigen::internal::pround(const Packet&)':
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/GenericPacketMath.h:826:48: error: 'Eigen::numext::round' has not been declared
Packet pround(const Packet& a) { using numext::round; return round(a); }
^
In file included from /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish.h:63:0,
from /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/Arduino.h:30,
from sketch/spi.ino.cpp:1:
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/Half.h: At global scope:
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/Half.h:732:50: error: expected unqualified-id before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half round(const half& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/Half.h:732:50: error: expected ')' before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half round(const half& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/Half.h:732:50: error: expected ')' before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half round(const half& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/BFloat16.h:564:54: error: expected unqualified-id before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/BFloat16.h:564:54: error: expected ')' before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/arch/Default/BFloat16.h:564:54: error: expected ')' before 'const'
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16& a) {
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:35: note: in definition of macro 'round'
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/functors/UnaryFunctors.h: In member function 'const Scalar Eigen::internal::scalar_round_op::operator()(const Scalar&) const':
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:33: error: expected unqualified-id before '(' token
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/functors/UnaryFunctors.h:798:106: note: in expansion of macro 'round'
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::round(a); }
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h: At global scope:
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:36: error: expected unqualified-id before ')' token
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h:467:1: note: in expansion of macro 'round'
round() const
^
/home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/cores/maple/wirish_math.h:123:37: error: expected ')' before '>=' token
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
^
/home/user/Arduino/libraries/Bolder_Flight_Systems_Eigen/src/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h:467:1: note: in expansion of macro 'round'
round() const
^
Multiple libraries were found for "Wire.h"
Used: /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/libraries/Wire
Not used: /home/user/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31/libraries/WireSlave
exit status 1
Error compiling for board Generic STM32F103C series.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.