[SOLVED] How to use precompiled libraries

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] How to use precompiled libraries

    Hi,

    I'm a new user of Embedded Studio using it mainly for Nordic Semiconductor BLE devices.

    Now I'm trying to add the BSEC library from Bosch Sensortec to my project. But it won't work. The BSEC is a precompiled library which I added here:
    Project Options => (Common) Linker => Additional Input Files

    I'm using the gcc version for Cortex M4.
    The path in my project is: ../../../../Bosch/BSEC/algo/normal_version/bin/gcc/Cortex_M4/libalgobsec.a

    I'm getting a lot of errors like these (cutted after ...does not from Embedded Studio):
    D:/Programme/SEGGER/gcc/arm-none-eabi/bin/ld: error: Output/Release/Exe/AquaSens.elf uses VFP register arguments, ../../../../Bosch/BSEC/algo/normal_version/bin/gcc/Cortex_M4/libalgobsec.a(bsec_interface.o) does not
    1> D:/Programme/SEGGER/gcc/arm-none-eabi/bin/ld: failed to merge target specific data of file ../../../../Bosch/BSEC/algo/normal_version/bin/gcc/Cortex_M4/libalgobsec.a(bsec_interface.o)

    What is the right way to add precompiled libraries to a project?

    Thanks in advance :) !

    Roger
  • Hello Roger,

    Thank you for your inquiry.
    The Additional Input Files approach is the correct one.
    From the error message it appears that the target device you are using does not have a floating point unit but with the library you are trying to generate floating point instructions which leads to an error.
    This can be either due to using the wrong library version or selecting the wrong target device in Embedded Studio project settings.

    Could you check if your target has a floating point unit and if it is selected correctly in the Project settings?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Nico,

    Thank you for your answer, it helped me further.

    As you supposed I was using the wrong library. I've changed it to the bsec floating point library ...Cortex_M4F/libalgobsec.a and now it compiles without errors.

    Regards,
    Roger
  • Hello Roger,

    Thank you for your inquiry.
    Great to hear that you are up and running again.
    We will mark this thread as solved now.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.