Bosch Sensortec Community

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

    BME680 with STM32L073RZ

    Charlotte
    Member

    BME680 with STM32L073RZ

    Hello,

    I'm doing a project with the BME680 with STM32L073RZ. I  have put all the .c and .h file in the project. But I can't use the function declared in bsec_interface.h, such as bsec_set_configuration and bsec_set_state, however I can use the bsec_init() without error, it's so strange.

    When I use the bsec_set_configuration :

    ret.bsec_status = bsec_set_configuration(bsec_config, bsec_config_len, work_buffer, sizeof(work_buffer));

    The error says: undefined reference to `bsec_set_configuration'

    I don't know how to make the functions and the project work. ..

    9 REPLIES 9
    handytech
    Community Moderator

    Re: BME680 with STM32L073RZ

    It looks like you might have copied the BSEC binary file from the "Lite" version folders instead of the "Normal" version. The Lite version doesn't include the state and configuration features of the BSEC library to reduce its code size and memory requirements.

    Charlotte
    Member

    Re: BME680 with STM32L073RZ

    No No No, I'm sure that I used "Normal" version. The functions are well-declared in the bsec_interface.h. I think the program can't find the .c file with the functions.  So I want to make sure two things.

    1. Copy and paste the .h file and .c file in the project, that's enough ?

    I have now in my project: bsec_datatypes.h

                                                        bsec_interface.h

                                                        bsec_integration.h

                                                        bme680.h

                                                        bme680_defs.h

                                                        libalgobsec.a

                                                        bsec_integration.c

                                                        bme680.c

                                                        bme680_read.c (it's a file modified from bsec_iot_example.c)

    2. Should I do something with the libalgobsec.a file ?

                                                        

                                                       

    Minhwan
    Community Moderator

    Re: BME680 with STM32L073RZ

    Hello, 

     

    You have to ensure that the pre-build libalgobsec.a library is linked when you compile your project. 

    Please check integration guide page 15-16. 

    Arduino case: 

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

    ESP32 case: 

    https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BME680-on-ESPHome-using-Bosch-s-BSEC-lib...

    Hope it helps you. 

    Charlotte
    Member

    Re: BME680 with STM32L073RZ

    Thank you for your answer! Please, I have another question. In the function like save_state, there's nothing inside. Should I code something to save the state in the EEPROM ? Or it's in the library, it will save itself automatically?

    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