02-12-2020 08:55 PM
The device is running 4.19 Kernel and it supports bme680 kernel driver , i have added defconfig entries to build the driver
CONFIG_BME680=m
CONFIG_BME680_SPI=m
https://github.com/STMicroelectronics/linux/tree/v4.19-stm32mp/drivers/iio/chemical
How do i check the driver is functioning properly in runtime , dmesg did not show any probe success log for bme680.
Need help Cross compiling userspace library for STM32MP157C ,
Toolchain can be found in STM SDK
command to cross compile a normal c file
/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/arm-openstlinux_weston-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/SDK/sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_weston-linux-gnueabi spi-led_duty_off.c -o spi-led_duty_off
export AR=/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/arm-openstlinux_weston-linux-gnueabi-ar
export CC=/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/arm-openstlinux_weston-linux-gnueabi-gcc
export CXX=/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/arm-openstlinux_weston-linux-gnueabi-g++
The device is running linux distribution ST OpenSTLinux - Weston - (A Yocto Project Based Distro).
How can i compile userspace application and test the response from the sensor.
Please help!
Thank you
Sooraj
02-13-2020 03:34 PM - edited 02-17-2020 11:56 AM
I am not very familar with ST OpenSTLinux, would you be able to confirm whether this platform would support any of our standard compilers typ. use in bare metal (e.g. GCC or ARMCC)? There is for example here another release for the A7 too, but using the standard GNU Arm Embedded Toolchain.
Otherwise we would need to evaluate and implement this toolchain, which if possible to use could take significantly more time.
02-14-2020 01:47 PM
I am not sure about compiler type but here is some info on compiler
/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/arm-openstlinux_weston-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/home/ssd/STM/Stinger96/STM32MP15-Ecosystem-v1.0.0/Developer-Package/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/arm-openstlinux_weston-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/ssd/STM/Stinger96/STM32MP15-Ecosystem-v1.0.0/Developer-Package/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/../../libexec/arm-openstlinux_weston-linux-gnueabi/gcc/arm-openstlinux_weston-linux-gnueabi/8.2.0/lto-wrapper
Target: arm-openstlinux_weston-linux-gnueabi
Configured with: ../../../../../../work-shared/gcc-8.2.0-r0/gcc-8.2.0/configure --build=x86_64-linux --host=x86_64-openstlinux_weston_sdk-linux --target=arm-openstlinux_weston-linux-gnueabi --prefix=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr --exec_prefix=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr --bindir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi --sbindir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi --libexecdir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/libexec/arm-openstlinux_weston-linux-gnueabi --datadir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/share --sysconfdir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/etc --sharedstatedir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/com --localstatedir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/var --libdir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/lib/arm-openstlinux_weston-linux-gnueabi --includedir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/include --oldincludedir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/include --infodir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/share/info --mandir=/opt/st/stm32mp1/2.6-openstlinux-4.19-thud-mp1-19-10-09/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/opt/STM/workspace/workdir/openstlinux/build-stm32mp1/tmp-glibc/work/x86_64-nativesdk-openstlinux_weston_sdk-linux/gcc-cross-canadian-arm/8.2.0-r0/recipe-sysroot --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-openstlinux_weston-linux-gnueabi- --without-local-prefix --enable-lto --disable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/8.2.0 --with-build-time-tools=/opt/STM/workspace/workdir/openstlinux/build-stm32mp1/tmp-glibc/work/x86_64-nativesdk-openstlinux_weston_sdk-linux/gcc-cross-canadian-arm/8.2.0-r0/recipe-sysroot-native/usr/arm-openstlinux_weston-linux-gnueabi/bin --with-sysroot=/not/exist --with-build-sysroot=/opt/STM/workspace/workdir/openstlinux/build-stm32mp1/tmp-glibc/work/x86_64-nativesdk-openstlinux_weston_sdk-linux/gcc-cross-canadian-arm/8.2.0-r0/recipe-sysroot --without-long-double-128 libgcc_cv_powerpc_float128=no --enable-poison-system-directories --disable-static --enable-nls --enable-initfini-array
Thread model: posix
gcc version 8.2.0 (GCC)
I was able to download ,just to be sure i have downloaded the right file
02-17-2020 04:12 PM - edited 02-17-2020 04:21 PM
The version you linked was made for a different platform (esp. a different compiler, that comes with the Azure SDK, gcc-arm-linux-eabi-hf). I was thinking about the release 'BSEC_1.4.7.4_Cortex-A7_with_fPIC.zip', that was built to run on bare metal A7 (gcc-arm-none-eabi). Another alternative for your MCU would be to run BSEC in the M4 core of your MCU, that should be compatible with the binaries from the standard BSEC package on our website.
I will forward the request internally whether we can support your specific platform (arm-openstlinux_weston-linux-gnueabi-gcc), but be aware that deploying BSEC on a new platform can take up to several weeks.
EDIT: I also just realized that in your initial post your were not able to successfully communicate with the BME680. Unless you are using our BME680 sensor API, I would recommend that you get platform-specific support from your driver provider.
03-04-2020 09:22 AM