Linking BSEC library to ESP-IDF for BME680
Posted: Tue Oct 08, 2019 2:50 pm
I am using the BME680 with the ESP32-PoE and I want to use the BSEC library to get the IAQ. I have been stuck at the last step of linking the pre-built libalgobsec.a library. This is what my CMakeLists file in my BSEC components folder looks like:
This gave me an error - FAILED: bme680_test_with_bsec.elf. The CMakeError.log file gives this output:
Code: Select all
set(COMPONENT_SRCS "src/bme680.c"
"src/bsec_integration.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
register_component()
add_library(algobsec STATIC IMPORTED)
set_property(TARGET algobsec PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/components/BSEC/lib/libalgobsec.a)
target_link_libraries(${COMPONENT_TARGET} PUBLIC algobsec)
Code: Select all
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Users/Apurva/.espressif/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
Build flags: -mlongcalls
Id flags:
The output was:
1
c:/users/apurva/.espressif/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find crt1-sim.o: No such file or directory
c:/users/apurva/.espressif/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find _vectors.o: No such file or directory
c:/users/apurva/.espressif/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lsim
c:/users/apurva/.espressif/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lhandlers-sim
c:/users/apurva/.espressif/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a5-5.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lhal
collect2.exe: error: ld returned 1 exit status