Bosch Sensortec Community

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

    Support for Multiple BME688 in BSEC2 on ESP32 - link error

    Support for Multiple BME688 in BSEC2 on ESP32 - link error

    evansf
    Member

    Is there no multi device support for ESP32?  I am linking to the right blob, this is all Bosch code from the BSEC distribution, it should link.

    Details:

    Using Arduino,the example, bme68x_demo_sample.ino, using board Adafruit ESP32 Feather, fails to link with the following display:

    Library Bosch-BSEC2-Library has been declared precompiled:
    Using precompiled library in D:\Data\PROJECTS\Sketchbook\libraries\Bosch-BSEC2-Library\src\esp32
    libraries\Bosch-BSEC2-Library\bsec2.cpp.o:(.literal._ZN5Bsec218updateSubscriptionEP21bsec_virtual_sensor_thf+0x0): undefined
               reference to `bsec_update_subscription_m'
    ...etc for additional multi calls.

    I have reloaded from GIT using a zip file for V1.5.0 and the library.json file shows:
    "version": "1.5.2400",

    In my application, I need to instantiate for multiple BME688 devices (up to 4) at two separate I2S addresses on each of two I2S hardware connections.  I know HOW to do this but the required calls are not in the pre-compiled library.  Anybody got a clue?

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi evansf,

    Example bme68x_demo_sample.ino only run with BME688 dev kit, if you would like to other hardware, you need to modify the code based on you own hardware.

    I did exactly that to start with and I got the link error.  Debugging to find the problem revealed that the BSEC.cpp code uses the multi calls (e.g.  bsec_update_subscription_m() instead of the earlier bsec_update_subscription()  )  functions.  To make my problem clearer for this post,  I attempted to compile the example code supplied in the dev-kit, using the board from the dev-kit without any changes.  That is to say, I am trying to get the dev kit example to compile and link and run on the dev-kit hardware.  This attempt fails with the same link error.

    The dev-kit example code does not compile and run on the dev-kit because the ESP32 library blob does not contain the _m() multiple versions of the interface functions which are required in the BSEC2.cpp class methods.  The bsec code used in association with the AI-Studio does not use the BSEC2 class interface and it links with the older library interface (i.e. not the  xxxxxxx_m() functions).

    With this understanding,  can you help me get a succesful compile of bsec2 which will link with the ESP32 board that is used in the dev-kit?  I believe that it will require a new library blob from the BSEC team at Bosch. 

     

    I moved this code over to a carefully provisioned PlatforIO project.  under that system,  the example code compiles and links correctly.  Why the Arduino environment does not work remains a mystery.

    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