08-14-2022 02:41 AM
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
08-14-2022 05:10 AM
08-14-2022 05:05 PM
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.
08-14-2022 05:28 PM
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.
08-15-2022 04:59 AM
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?