Bosch Sensortec Community

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

    BSEC Lib and STM32F303

    BSEC Lib and STM32F303

    oner
    Member

    Hi,

     

    I tried to use BME680 sensor with STM32F303 in STM32Cube IDE (macos version). I can read gas sensor data, temp and humudity with BME680 lib. But i got below error when I tried to use BSEC lib to read IAQ data. How can I solve this issue?

     

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: Core/Src/bsec_integration.o: in function `bme680_bsec_update_subscription':

    /Users/*******/STM32CubeIDE/workspace_1.6.1/BME680_IQA/Debug/../Core/Src/bsec_integration.c:140: undefined reference to `bsec_update_subscription'

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: Core/Src/bsec_integration.o: in function `bsec_iot_init':

    /Users/******/STM32CubeIDE/workspace_1.6.1/BME680_IQA/Debug/../Core/Src/bsec_integration.c:185: undefined reference to `bsec_init'

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /Users/*****/STM32CubeIDE/workspace_1.6.1/BME680_IQA/Debug/../Core/Src/bsec_integration.c:195: undefined reference to `bsec_set_configuration'

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /Users/******/STM32CubeIDE/workspace_1.6.1/BME680_IQA/Debug/../Core/Src/bsec_integration.c:206: undefined reference to `bsec_set_state'

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: Core/Src/bsec_integration.o: in function `bme680_bsec_process_data':

    /Users/******/STM32CubeIDE/workspace_1.6.1/BME680_IQA/Debug/../Core/Src/bsec_integration.c:416: undefined reference to `bsec_do_steps'

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: Core/Src/bsec_integration.o: in function `bsec_iot_loop':

    /Users/******/STM32CubeIDE/workspace_1.6.1/BME680_IQA/Debug/../Core/Src/bsec_integration.c:520: undefined reference to `bsec_sensor_control'

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /Users/******/STM32CubeIDE/workspace_1.6.1/BME680_IQA/Debug/../Core/Src/bsec_integration.c:538: undefined reference to `bsec_get_state'

    collect2: error: ld returned 1 exit status

    5 REPLIES 5

    BSTRobin
    Community Moderator
    Community Moderator

    Hello oner,

    What is BSEC version you used?
    If you use BSEC 1.4.8.0, you could compile with library "BSEC_1.4.8.0_Generic_Release\algo\normal_version\bin\gcc\Cortex_M4F\libalgobsec.a"

    Hi Robin,

    I am using "BSEC_1.4.8.0_Generic_Release_updated_v3", but how can I add "libalgobsec.a" data in STM32Cube. I tried to add in Project folder and add folder link in Project Includes and Source Locations. But error is still there. I added screenshots.

    Öner

    Hi Robin,

    I crated new project and add the library only in setings, and it works. The sample code reads sensör parameters correctly. But iaq variable is 25 and 

    iaq_accuracy is alwas 0. I think that it is an another problem. I will search this problem seperatly.
     
    Thanks.
     
    Öner.

    BSTRobin
    Community Moderator
    Community Moderator

    Hello oner,

    Good.

    The program needs to run for a period of time until the accuracy state changes.

    BSEC IAQ accuracy.png

    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