I'm doing a project with the BME680 with STM32L073RZ. I have put all the .c and .h file in the project. But I can't use the function declared in bsec_interface.h, such as bsec_set_configuration and bsec_set_state, however I can use the bsec_init() without error, it's so strange.
When I use the bsec_set_configuration :
ret.bsec_status = bsec_set_configuration(bsec_config, bsec_config_len, work_buffer, sizeof(work_buffer));
The error says: undefined reference to `bsec_set_configuration'
I don't know how to make the functions and the project work. ..
Solved! Go to Solution.
It looks like you might have copied the BSEC binary file from the "Lite" version folders instead of the "Normal" version. The Lite version doesn't include the state and configuration features of the BSEC library to reduce its code size and memory requirements.
No No No, I'm sure that I used "Normal" version. The functions are well-declared in the bsec_interface.h. I think the program can't find the .c file with the functions. So I want to make sure two things.
1. Copy and paste the .h file and .c file in the project, that's enough ?
I have now in my project: bsec_datatypes.h
bme680_read.c (it's a file modified from bsec_iot_example.c)
2. Should I do something with the libalgobsec.a file ?
You have to ensure that the pre-build libalgobsec.a library is linked when you compile your project.
Please check integration guide page 15-16.
Hope it helps you.