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,

    You could refer attached BSEC2 library for ESP32-S2. Compile it again.

    Thank you for the very quick response.

    I tried adding this as a library by ZIP but it isn't correct for the Library Manager. Do I simply replace the existing Bosch-BSEC2-Library-1.1.2061 contents with the contents of ~/Documents/Arduino/Bosch/V2061_GCC_ESP32-S2/examples/bsec2 (which is what the ZIP expanded to)? This seems to be orrect from looking at it.

    I replaced the production BSEC2 library in the IDE with the bsec2 contained within the ZIP and attempted to compile the basic_config_state sketch. I get the following error:

    Library bsec2 has been declared precompiled:
    Precompiled library in "/Users/dad/Documents/Arduino/libraries/bsec2/src/esp32s2" not found
    /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: /private/var/folders/gc/r7w6xycj5tx5bfd1415nhk1c0000gq/T/arduino-sketch-FF9BEF9F9AA1E23F6396B2B98681F240/sketch/basic_config_state.ino.cpp.o:(.literal._Z5setupv+0x24): undefined reference to `bsec_get_version'
    /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: /private/var/folders/gc/r7w6xycj5tx5bfd1415nhk1c0000gq/T/arduino-sketch-FF9BEF9F9AA1E23F6396B2B98681F240/sketch/basic_config_state.ino.cpp.o: in function `Bsec::getVersion()':
    .
    .
    .
    /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: /private/var/folders/gc/r7w6xycj5tx5bfd1415nhk1c0000gq/T/arduino-sketch-FF9BEF9F9AA1E23F6396B2B98681F240/libraries/bsec2/bsec.cpp.o: in function `Bsec::doSensorControl()':

    /Users/dad/Documents/Arduino/libraries/bsec2/src/bsec.cpp:168: undefined reference to `bsec_sensor_control'
    collect2: error: ld returned 1 exit status

    exit status 1

    Compilation error: exit status 1

    I then symlinked esp32s2 as before and still get the could not decode instruction; possible configuration mismatch error.

    I discovered what may be a similar problem and a solution but it is well beyond me to evaluate it as it deals deep into the ESP32 hardware I believe. But it may help understand what the solution might be here?

    __atomic_exchange_1 not implemented (IDFGH-4649)  

    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