Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    ESP32-S2 + BME688 - Library not found/could not decode instruction; possible configuration mismatch

    ESP32-S2 + BME688 - Library not found/could not decode instruction; possible configuration mismatch

    BillW
    Member

    I am using an Adafruit ESP32-S2 TFT with their BME688 dev module and am unable to get it to link. I have followed the instructions found here fairly successfully but I think my problems go beyond that.

    My system: Macbook Pro, MacOS 12.5.

    IDE: I have tried both the Arduino 1.8.19 and the Arduino IDE 2.0.0-RC9.1 with the same/similar result.

    At first I did get the link error 

    Library Bosch-BSEC2-Library-1.1.2061 has been declared precompiled:
    Precompiled library in "/Users/dad/Documents/Arduino/libraries/Bosch-BSEC2-Library-1.1.2061/src/esp32s2" not found

    Note "/esp32s2/". I made a symlink from "esp32" to "esp32s2" and that solved that but lead to other errors:

    Library Bosch-BSEC2-Library-1.1.2061 has been declared precompiled:
    Using precompiled library in /Users/dad/Documents/Arduino/libraries/Bosch-BSEC2-Library-1.1.2061/src/esp32s2
    /Users/dad/Library/Arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: /Users/dad/Documents/Arduino/libraries/Bosch-BSEC2-Library-1.1.2061/src/esp32s2/libalgobsec.a(bsec_codegen_do_steps.o)(.text.bsec_codegen_do_steps+0x1f1): could not decode instruction; possible configuration mismatch
    /Users/dad/Library/Arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: /Users/dad/Documents/Arduino/libraries/Bosch-BSEC2-Library-1.1.2061/src/esp32s2/libalgobsec.a(bsec_codegen_sensor_control.o)(.text.bsec_codegen_sensor_control+0x50f): could not decode instruction; possible configuration mismatch
    /Users/dad/Library/Arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: /Users/dad/Documents/Arduino/libraries/Bosch-BSEC2-Library-1.1.2061/src/esp32s2/libalgobsec.a(bsec_codegen_sensor_control.o)(.text.bsec_codegen_sensor_control+0x608): could not decode instruction; possible configuration mismatch
    .
    .
    .

    I'd really like to get this working with the Bosch libraries so any assistance I could get would be appreciated.

    Bill Waggoner

    7 REPLIES 7

    BSTRobin
    Community Moderator
    Community Moderator

    Hi BillW,

    From the above compilation information, ESP32-S2 BSEC library wasn't correctly linked.
    You could refer to the instructions on GitHub to configure your compilation environment to ensure that you could link the ESP32-S2 BSEC library correctly.

    https://github.com/BoschSensortec/Bosch-BSEC2-Library

     

    Yes, I have already done that as I described above.

    The instructions no longer exactly match the current Expressif's supplied platform.txt but I have added the {compiler.libraries.ldflags} to it in the indicated place.

    If you look at the first error you can see that it is looking under ~/Documents/Arduino/libraries/bsec2/src/esp32s2 for the library file. This is the board I am using. There is NO esp32s2 folder. This tells me that I have correctly modified the platform.txt because it is now looking inside the bsec2 library.

    However, when I try to create the esp32s2 folder by symlinking it to esp32 (which DOES exist) I get the loader error.

    I believe that this is because I am running on an esp32s2 and NOT an esp32. I do not have an esp32 to test against unfortunately.

    Has this library been tested under the esp32s2? I do not see that model listed as supported, maybe I am making a bad assumption?

    BSTRobin
    Community Moderator
    Community Moderator

    Hi BillW,

    The BSEC library previously provided was compiled in ESP32-S2. It has no official release and is specially provided for you.

    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