Using static library ".a file" (BSXLite) with STM32 microcontroller not found

Hello everybody. I have been working on try to use This awesome IDE to do a sensorFusion with BMX055 IMU. In order to prepare mysel before recieve the microcontroller or the IMU, I have been developing a code, but I reached a point where I am completely stucked and I do not know what more to do.

The steps i did have been.

install STM32F103C series microcontroller (i used a spanish tutorial but the main procedures are):

-Allow support for SAND boards.
-add url for STM32 board (http://dan.drown.org/stm32duino/package_STM32duino_index.json)
-Install STM32F103C board.

It does not seem to have any problem.
Then, I downloaded BSXLite from official page (https://www.bosch-sensortec.com/bst/products/all_products/bsxlite):

I added the library as:

libraries/algobsx/library.properties
libraries/algobsx/src/[header files]
libraries/algobsx/library.properties
libraries/algobsx/src/cortex-m3/libalgobsx.a (the one from libalgobsx3_CortexM3)

inside my library.properties file I enabled precompiled files and included the ldflags as it is says here (Arduino IDE 1.5: Library specification · arduino/Arduino Wiki · GitHub) giving me the following file:

name=algobsx
version=1.0
author=Bosch Sensortec GmbH
maintainer=Arduino <swdev@arduino.org>
sentence=Arduino 9 Axes Fusion Library
paragraph=Allows 9 axes sensor fusion
category=Device Control
url=http://www.arduino.org/learning/reference/9-Axes-Motion
architectures=*
precompiled=true
ldflags=-lalgobsx.a

then i just run this basic arduino code:

#include <BsxLibraryCalibConstants.h>
#include <BsxLibraryErrorConstants.h>
#include <BsxFusionLibrary.h>
#include <BsxLibraryConstants.h>
#include <BsxLibraryDataTypes.h>

/************/

ts_dataxyzf32* acc_linear;


/***********/
void setup() {
  uint8_t input;

 BSX_U8 bsxLibConfAcc[] = {37,0,3,1,0,9,12,150,0,16,60,0,1,0,1,0,176,4,82,3,0,0,64,65,1,1,1,1,2,2,2,3,3,1,1,180,115};
BSX_U8 bsxLibConfMag[] = {39,0,2,1,20,5,20,5,196,9,6,9,112,23,0,0,128,61,205,204,76,63,0,0,224,64,1,1,1,1,1,1,1,1,1,1,1,134,84};
BSX_U8 bsxLibConfGyro[] = {14,0,1,1,3,9,12,136,19,16,1,1,129,46};
BSX_U8 bsxLibConf[] = {116,6,1,1,114,8,0,13,226,109};// <- this one is really long so I skipped a few numbers here

initParam_t s_input;

s_input.accelspec = (BSX_U8 *)&bsxLibConfAcc;
s_input.magspec = (BSX_U8 *)&bsxLibConfMag;
s_input.gyrospec = (BSX_U8 *)&bsxLibConfGyro;
s_input.usecase = (BSX_U8 *)&bsxLibConf;

bsx_init(&s_input);
  
  //Set the heading sensitivity for compass and M4G
  input = 3;
  bsx_set_compass_headingsensitivity(input);

  //Set the orientation correction speed for NDOF
  input = 3;
  bsx_set_ndof_orientcorrectionspeed(input);

  //Set the Magnetic data filter mode
  input = 3;
  bsx_set_magfiltermode(input);

  //Set the Magnetic calibration accuracy status sensitivity
  input = 3;
  bsx_set_magcalibacc_sensitivity(input);

  //Set the Magnetic calibration speed
  input = 3;
  bsx_set_magcalibrationspeed(input);

  //Set the Magnetic calibration accuracy auto recovery mode
  input = 1;
  bsx_set_compass_magcalibaccautorecmode(input);
}

void loop() {
  bsx_get_linearacceleration(acc_linear);
}

}

And any function is recognised during compilation. I know probably there is issues on this code, but the problem is that seems like functions from static library are not being read:

/home/innova2/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++ -Os -Wl,–gc-sections -mcpu=cortex-m3 -T/home/innova2/.arduino15/packages/stm32duino/hardware/STM32F1/2019.10.9/variants/generic_stm32f103c/ld/bootloader_20.ld -Wl,-Map,/tmp/arduino_build_893436/sketch_nov13a.ino.map -L/home/innova2/.arduino15/packages/stm32duino/hardware/STM32F1/2019.10.9/variants/generic_stm32f103c/ld -o /tmp/arduino_build_893436/sketch_nov13a.ino.elf -L/tmp/arduino_build_893436 -lm -lgcc -mthumb -Wl,–cref -Wl,–check-sections -Wl,–gc-sections -Wl,–unresolved-symbols=report-all -Wl,–warn-common -Wl,–warn-section-align -Wl,–warn-unresolved-symbols -Wl,–start-group /tmp/arduino_build_893436/sketch/sketch_nov13a.ino.cpp.o /home/innova2/Arduino/libraries/algobsx/src/cortex-m3/libalgobsx.a /tmp/arduino_build_893436/core/wirish/start.S.o /tmp/arduino_build_893436/core/wirish/start_c.c.o /tmp/arduino_build_893436/core/wirish/syscalls.c.o /tmp/arduino_build_893436/core/board.cpp.o /tmp/arduino_build_893436/core/wirish/boards.cpp.o /tmp/arduino_build_893436/core/wirish/boards_setup.cpp.o /tmp/arduino_build_893436/core/core.a -Wl,–end-group
/tmp/arduino_build_893436/sketch/sketch_nov13a.ino.cpp.o: In function setup()': /home/innova2/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-objcopy -O binary /tmp/arduino_build_893436/sketch_nov13a.ino.elf /tmp/arduino_build_893436/sketch_nov13a.ino.bin /home/innova2/Arduino/sketch_nov13a/sketch_nov13a.ino:72: warning: undefined reference to bsx_init(initParam_t*)’
/home/innova2/Arduino/sketch_nov13a/sketch_nov13a.ino:76: warning: undefined reference to bsx_set_compass_headingsensitivity(unsigned char)' /home/innova2/Arduino/sketch_nov13a/sketch_nov13a.ino:80: warning: undefined reference to bsx_set_ndof_orientcorrectionspeed(unsigned char)’
/home/innova2/Arduino/sketch_nov13a/sketch_nov13a.ino:84: warning: undefined reference to bsx_set_magfiltermode(unsigned char)' /home/innova2/Arduino/sketch_nov13a/sketch_nov13a.ino:88: warning: undefined reference to bsx_set_magcalibacc_sensitivity(unsigned char)’
/home/innova2/Arduino/sketch_nov13a/sketch_nov13a.ino:92: warning: undefined reference to bsx_set_magcalibrationspeed(unsigned char)' /home/innova2/Arduino/sketch_nov13a/sketch_nov13a.ino:96: warning: undefined reference to bsx_set_compass_magcalibaccautorecmode(unsigned char)’
/tmp/arduino_build_893436/sketch/sketch_nov13a.ino.cpp.o: In function loop()': /home/innova2/Arduino/sketch_nov13a/sketch_nov13a.ino:115: warning: undefined reference to bsx_get_linearacceleration(ts_dataxyzf32*)’

I followed several similiar issues like this one (https://github.com/arduino/Arduino/issues/4336 )but no clue what’s wrong with my approach.

Any clues what I am doing wrong?

Hi Solrac3589,

have you made any progress? We would like to get BSXlite running on any ARM development board so that we can compare it against Madgwick fusion