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-17-2022 10:35 AM - edited 08-17-2022 10:35 AM
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
08-17-2022 05:15 PM
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?
09-13-2022 11:12 AM
Hi BillW,
The BSEC library previously provided was compiled in ESP32-S2. It has no official release and is specially provided for you.