Recently I bought some WisBlock board and Sensors. I mount a board with the sensors RAK1906 and RAK1903. I compiled the examples for RAK1903 without problems, but when I tried to compile the example for RAK1906 for BOSH BME680 I am receiving a lot of compilation errors (pasted below):
Could you help me?
Library BSEC_Software_Library has been declared precompiled:
Precompiled library in “F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src\cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard\fpv4-sp-d16-hard” not found
Precompiled library in “F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src\cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard” not found
f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BSEC_Software_Library\BSEC_Software_Library.a(bsec.cpp.o): in function Bsec::beginCommon()': F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:157: undefined reference to bsec_init’
f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BSEC_Software_Library\BSEC_Software_Library.a(bsec.cpp.o): in function Bsec::getVersion()': F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:317: undefined reference to bsec_get_version’
f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BSEC_Software_Library\BSEC_Software_Library.a(bsec.cpp.o): in function Bsec::updateSubscription(bsec_virtual_sensor_t*, unsigned char, float)': F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:180: undefined reference to bsec_update_subscription’
f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BSEC_Software_Library\BSEC_Software_Library.a(bsec.cpp.o): in function Bsec::setState(unsigned char*)': F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:286: undefined reference to bsec_set_state’
f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BSEC_Software_Library\BSEC_Software_Library.a(bsec.cpp.o): in function Bsec::readProcessData(long long, bsec_bme_settings_t)': F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:385: undefined reference to bsec_do_steps’
f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BSEC_Software_Library\BSEC_Software_Library.a(bsec.cpp.o): in function Bsec::run(long long)': F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:202: undefined reference to bsec_init’
f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:210: undefined reference to bsec_update_subscription' f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:216: undefined reference to bsec_sensor_control’
f:/users/claudio rosa/documents/arduinodata/packages/raknrf/tools/arm-none-eabi-gcc/9-2019q4/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: F:\Users\Claudio Rosa\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.cpp:246: undefined reference to `bsec_get_state’
collect2.exe: error: ld returned 1 exit status
exit status 1
Erro compilando para a placa WisBlock Core RAK4631 Board
Bosch BSEC library changed in November 2020.
In order to get it compiled for WisBlock you need to change one line in the RAK BSP.
Please locate the file boards.txt inside the RAK BSP. On Windows the path is:
C:\Users\>USERNAME<\AppData\Local\Arduino15\packages\raknrf\hardware\nrf52\0.21.1 >USERNAME< should be replaced with your username.
Open boards.txt with a text editor (notepad or similar, NOT WORD) and look for this line: WisCoreRAK4631Board.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
it should be line 38.
Change the line to: WisCoreRAK4631Board.build.mcu=cortex-m4
and save the file. Close ArduinoIDE, open it again and try to compile the example again.
I am sorry for the inconvenience. We are in the process to update the BSP and will release a new version soon.
This would seem to indicate that somehow the setup isn’t providing the path to it as a -L flag to the linker. It seems like the linker search -L flags aren’t literally part of the library distro itself but need to somehow come from the IDE, eg, for each elected library adding a -L to the appropriate target archiecture subdirectory.
Overall blame for all of this should fall on Bosch, in that they’re so much more concerned about secrecy than functionality, that they ship this code only in extremely awkward, problem-causing binary form, and not portable, maintainable source form. You might want to try using the sensor in plain mode without the problematic BSEC.
Sorry, but you are mixing two differents cases in two differents environments:
This case was in Arduino IDE environment, and Bernd fixed it;
The other is the same WisBlock solution (RAK1906+RAK1903) but with PlatformIO IDE, where I am receiving the error message that you metioned and you got in the other case “Error on link process - cannot find -lalgobsec”
Could you publish the RAK1906 library in the PlatformIO? The example that we have it is for Arduino but I already verified that your RAK1906 (BME680) library isn´t available in the PlatformIO.