Dear Bosch community,
I’m using a Bosch BME680 sensor with LPC845M301JBD64E. With Bosch’s BME680 driver I can read fine the values of temperature, humidity and pressure.
Now I need to read the output values of IAQ, CO2 Equivalent and VOC equivalent.
Since the only way to get these values is by using the BSEC precompiled library, I’m trying to use it but without success.
I’m working with MCUXpresso IDE and I already linked the library on my projet, but when I compile it, i’m getting these errors:
c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_188.8.131.52907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(bsec_codegen_update_subscription.o): in function `bsec_codegen_update_subscription':
bsec_codegen_update_subscription.c:(.text+0x338): undefined reference to `roundf'
c:/nxp/mcuxpressoide_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.win32_184.108.40.206907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\bme680_Project\bsec\lib\libalgobsec.a(Bsec.o): in function `bsec_Bsec_getModHeatingDuration':
It seems like those undefined references have to do with the library linking.
What may I do to solve this problem?
Solved! Go to Solution.
Did you mean c99 instead of C89?
If I use C89 in the compile command that you wrote, I get a lot of errors in comments since “//” to demark a comment isn't part of C89.
If I use C99 my code is only increasing the used flash size but the problem I mentioned before persists.
I still couldn't figure out what is happening but for a while I just used the functions roundf ,fminf, fmaxf in my main.c and the code compiles fine.
As mcuxpresso compiles a library only if it is being used, perhaps the bsec precompiled library is not enough to point to the compiler to do that. It's just a hypothesis.
My major problem now is getting the values of bVOC and CO2e. But I think it is not related to this issue, so I opened this other topic .