04-19-2023 04:11 PM - edited 04-21-2023 11:59 AM
Hi,
We are trying to interface the BME688 sensor which is present in our custom hardware based on STM32MP1. After going through all the documentation, we have added the following files into my source code: from BSEC2.4.0.0_Generic_Release_23012023/examples/BSEC_Integration_Examples/src/bme68x/ , added three bme68x.c, bme68x.h, bme68x_defs.h and from BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/inc/ added two files bsec_datatypes.h, bsec_interface.h.
Using the bme68x_dev structure, added i2c interface, write, read and delay_us function pointers. Next called bme68x_init() and bsec_init().
When we tried to link the bsec static C library, downloaded from https://www.bosch-sensortec.com/software-tools/software/bme688-software/ (BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/gcc/Cortex_A7/libalgobsec.a) with the application, we got lot of errors. I have attached the error log.
The device is based on Yocto and uses openstlinux (arm-openstlinux_weston-linux-gnueabi-gcc).
We had faced the same issue previously too for which you provided the library(BSEC2.1.0) which was built for arm-openstlinux_weston-linux-gnueabi-gcc https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BME688-library-linking-fails-in-STM32MP1...
We appreciate the support your team provided during those times. Kindly help us with this issue too. We are stuck with this issue.
[ attaching the build/error log along with this ]
Thank you
Deepak S
Solved! Go to Solution.
05-04-2023 11:20 AM
Hi Deepak,
Confirm with you, you are using the following compilation options now, right?
CC="arm-openstlinux_weston-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
05-04-2023 12:05 PM
Hi BSTRobin,
I confirm that we are using the above mentioned options.
CC="arm-openstlinux_weston-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
You can find those in the environment file, if you have downloaded the SDK we mentioned in the previous reply:
The compiler that we use is - arm-openstlinux_weston-linux-gnueabi-gcc or arm-ostl-linux-gnueabi-gcc . Both are same, just the gcc version is different.
Download the SDKv1.2.0 or you can download directly from this link: https://www.st.com/en/embedded-software/stm32mp1dev.html
Select the Yocto SDK and also the version 1.2.0 and then download it.
After downloading extract the file and run the st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.6-openstlinux-20-02-19.sh script for installation and it will install in the default path /opt/st/stm32mp1/2.6-openstlinux-20-02-19.
To make the environment setup please run as below:
$ source /opt/st/stm32mp1/2.6-openstlinux-20-02-19/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
I have attached the log file again for your reference.
Thank you
05-05-2023 09:12 AM
05-05-2023 09:17 AM
Thank you for the library BSTRobin. I will let you know the feedback as soon as possible.
05-06-2023 04:26 PM
Hi BSTRobin,
I compiled my application with the BSEC library that you provided in the above reply. We were able to successfully compile the application without any BSEC library related errors or warnings.
Thank you BSTRobin and team for your great support.