Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME680 on LPC845 using Bosch's BSEC library

    BME680 on LPC845 using Bosch's BSEC library

    Carlos_Rafael
    Established Member

    Dear Bosch community,

    I’m using a Bosch BME680 sensor with LPC845M301JBD64E. With Bosch’s BME680 driver I can read fine the values of temperature, humidity and pressure.
    Now I need to read the output values of IAQ, CO2 Equivalent and VOC equivalent. 

    Since the only way to get these values is by using the BSEC precompiled library, I’m trying to use it but without success.
    I’m working with MCUXpresso IDE and I already linked the library on my projet, but when I compile it, i’m getting these errors:

    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(bsec_codegen_update_subscription.o): in function `bsec_codegen_update_subscription':
    bsec_codegen_update_subscription.c:(.text+0x338): undefined reference to `roundf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(Bsec.o): in function `bsec_Bsec_getModHeatingDuration':

    Bsec.c:(.text+0x5f8): undefined reference to `roundf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_do':
    ChannelHub.c:(.text+0x3a6): undefined reference to `roundf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ChannelHub.c:(.text+0x3ee): undefined reference to `roundf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ChannelHub.c:(.text+0x434): undefined reference to `roundf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(ChannelHub.o):ChannelHub.c:(.text+0x47a): more undefined references to `roundf' follow
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(GasHumidityBaselineTracker.o): in function `bsec_GasHumidityBaselineTracker_doStep':
    GasHumidityBaselineTracker.c:(.text+0x498): undefined reference to `fminf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x602): undefined reference to `fmaxf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x6e0): undefined reference to `roundf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(HumidityTemperatureCorrector.o): in function `bsec_HumidityTemperatureCorrector_updateInterfaceDependency':
    HumidityTemperatureCorrector.c:(.text+0x22c): undefined reference to `fminf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(IaqEstimator.o): in function `bsec_IaqEstimator_doStep':
    IaqEstimator.c:(.text+0xe2): undefined reference to `fmaxf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0xea): undefined reference to `fminf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x112): undefined reference to `fmaxf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x160): undefined reference to `fmaxf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x18e): undefined reference to `fmaxf'
    c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x196): undefined reference to `fminf'

     

     

    It seems like those undefined references have to do with the library linking.

    What may I do to solve this problem?

     

    Best regards,

    12 REPLIES 12

    Minhwan
    Community Moderator
    Community Moderator

    Hello, 

     

    Yes, you have to inlucde BSEC library in your platform. 

    In terms of LPC845, we don't have exact instruction, but below url could help you. 

    https://github.com/BoschSensortec/BSEC-Arduino-library

    There is some information about library setting. 

    Please let me know if you have any quesitons. 

    Thanks, 

     

    Hi Minhwan, thanks for your answer.

    I checked the instructions for arduino, but the installation guide is very specific for arduino's plataform and it is not helpping me to find out what I have to do on MCUXpresso to link this library to my project.

    Do you have any reference that I can check to link properly the bsec library on MCUXpresso?

    Thanks.

    Hello Carlos, 

    Could you give me more detail about your system? 

    1. MCU type (complete name with ROM/RAM size)
    2. Compiler IDE (version or download link)
    3. Compile command (like -c -O2 -march=msp32)
    4. Application details (like iot device, air purifier, monider)

     

    Thanks, 

    Hi Minhwan,

    1. LPC845M301JBD64, 32-bit Arm Cortex-M0+, 64 KB of flash memory and 16 KB of SRAM.
    2. MCUXpresso IDE v11.2.1_4149 Download link 
    3. arm-none-eabi-gcc
    4. IoT environment monitor

    Thanks

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist