Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BSEC library for Azure Sphere

    Community Moderator

    Re: BSEC library for Azure Sphere

    Unfortunately due to the current team's load and the fact that we will need to setup this new toolchain, we cannot guarantee any timeline for this new release.

    In the meantime, we could eventually offer if possible with the default release to try running BSEC in of the M4 cores mentioned in your originial post. Alternatively, I would note that it would still be possible to first collect raw sensor data in the appropriate BME680 configuration, and run BSEC offline/away from the edge  (e.g. using the BSEC dll over your datalog).

     

    Member

    Re: BSEC library for Azure Sphere

    Thanks for the reply.

    I have been looking into to using the the M4 (and M4F) versions of BSEC on the Azure Sphere, but at present I am getting different linking errors:

    >------ Build started: Project: CMakeLists, Configuration: Debug ------
      [1/4] cmd.exe /C "cd . && C:\PROGRA~2\MICROS~1\2019\COMMUN~1\Linux\gcc_arm\bin\ARM-NO~4.EXE -mcpu=cortex-m4 -g  -nostartfiles -Wl,--no-undefined -Wl,-n -T "C:/AzureSphere/RealTimeCore/linker.ld" CMakeFiles/AzureSphere_RealTimeCore.dir/main.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/mt3620-intercore.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/mt3620-timer-poll.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/mt3620-uart-poll.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/mt3620-adc.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/bsec_serialized_configurations_iaq.c.obj  -o AzureSphere_RealTimeCore.out  -lm ../../libalgobsec.a && cd ."
      FAILED: AzureSphere_RealTimeCore.out 
      cmd.exe /C "cd . && C:\PROGRA~2\MICROS~1\2019\COMMUN~1\Linux\gcc_arm\bin\ARM-NO~4.EXE -mcpu=cortex-m4 -g  -nostartfiles -Wl,--no-undefined -Wl,-n -T "C:/AzureSphere/RealTimeCore/linker.ld" CMakeFiles/AzureSphere_RealTimeCore.dir/main.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/mt3620-intercore.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/mt3620-timer-poll.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/mt3620-uart-poll.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/mt3620-adc.c.obj CMakeFiles/AzureSphere_RealTimeCore.dir/bsec_serialized_configurations_iaq.c.obj  -o AzureSphere_RealTimeCore.out  -lm ../../libalgobsec.a && cd ."
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(bsec_codegen_update_subscription.o): in function `bsec_codegen_update_subscription':
      bsec_codegen_update_subscription.c:(.text+0x222): undefined reference to `roundf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(Bsec.o): in function `bsec_Bsec_getModHeatingDuration':
      Bsec.c:(.text+0x520): undefined reference to `powf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: Bsec.c:(.text+0x52a): undefined reference to `powf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: Bsec.c:(.text+0x580): undefined reference to `roundf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_do':
      ChannelHub.c:(.text+0x204): undefined reference to `roundf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ChannelHub.c:(.text+0x27e): undefined reference to `roundf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ChannelHub.c:(.text+0x324): undefined reference to `roundf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ChannelHub.c:(.text+0x3be): undefined reference to `roundf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(ChannelHub.o):ChannelHub.c:(.text+0x3e8): more undefined references to `roundf' follow
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(GasHumidityBaselineTracker.o): in function `bsec_GasHumidityBaselineTracker_filterRobustMaxMin':
      GasHumidityBaselineTracker.c:(.text+0xf0): undefined reference to `expf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(GasHumidityBaselineTracker.o): in function `bsec_GasHumidityBaselineTracker_doStep':
      GasHumidityBaselineTracker.c:(.text+0x2ca): undefined reference to `expf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x436): undefined reference to `fminf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x5d6): undefined reference to `log10f'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x66a): undefined reference to `expf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x676): undefined reference to `roundf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(GasHumidityBaselineTracker.o): in function `bsec_GasHumidityBaselineTracker_updateInterfaceDependency':
      GasHumidityBaselineTracker.c:(.text+0x92e): undefined reference to `log10f'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x932): undefined reference to `fabsf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x964): undefined reference to `floorf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityBaselineTracker.c:(.text+0x968): undefined reference to `roundf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(GasHumidityPreProcessor.o): in function `bsec_GasHumidityPreProcessor_doStep':
      GasHumidityPreProcessor.c:(.text+0xd2): undefined reference to `log10f'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: GasHumidityPreProcessor.c:(.text+0x13a): undefined reference to `log10f'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(HumidityTemperatureCorrector.o): in function `bsec_HumidityTemperatureCorrector_updateInterfaceDependency':
      HumidityTemperatureCorrector.c:(.text+0x132): undefined reference to `fminf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: HumidityTemperatureCorrector.c:(.text+0x13e): undefined reference to `sinf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(IaqEstimator.o): in function `bsec_IaqEstimator_doStep':
      IaqEstimator.c:(.text+0xb4): undefined reference to `fmaxf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0xbc): undefined reference to `fminf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0xca): undefined reference to `fmaxf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x124): undefined reference to `fmaxf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x14c): undefined reference to `powf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x154): undefined reference to `fmaxf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x15c): undefined reference to `fminf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(IaqEstimator.o): in function `bsec_IaqEstimator_updateInterfaceDependency':
      IaqEstimator.c:(.text+0x390): undefined reference to `log10f'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x394): undefined reference to `fabsf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x3a4): undefined reference to `log10f'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x3ac): undefined reference to `log10f'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: IaqEstimator.c:(.text+0x3c2): undefined reference to `log10f'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(convertHumidity.o): in function `bsec_convertHumidity':
      convertHumidity.c:(.text+0x2a): undefined reference to `logf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: convertHumidity.c:(.text+0xa4): undefined reference to `expf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(normalizeFilterBw.o): in function `bsec_normalizeFilterBw':
      normalizeFilterBw.c:(.text+0x22): undefined reference to `fminf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: normalizeFilterBw.c:(.text+0x32): undefined reference to `fminf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(sin.o): in function `bsec_b_sin':
      sin.c:(.text+0xc): undefined reference to `sinf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ../../libalgobsec.a(sin.o): in function `bsec_sin':
      sin.c:(.text+0x1e): undefined reference to `sinf'
      c:/progra~2/micros~1/2019/commun~1/linux/gcc_arm/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: sin.c:(.text+0x26): undefined reference to `sinf'
    C:\AzureSphere\RealTimeCore\collect2.exe : error : ld returned 1 exit status
      ninja: build stopped: subcommand failed.
    
    Build failed.

    I'm not sure why I'm getting those errors, as -lm is already specified when compiling. In fact I am using some of those "undefined" functions in my code already, but BSEC can't seem to find them.

    What about the chance of getting the Linux armhf build (from COINES) re-compiled with the -fPIC option. Is it possible to have that this week?

    Community Moderator

    Re: BSEC library for Azure Sphere


    @jeremynz wrote:

    What about the chance of getting the Linux armhf build (from COINES) re-compiled with the -fPIC option. Is it possible to have that this week?


    Unfortunately we also cannot commit on this right now.


    @jeremynz wrote:

    I'm not sure why I'm getting those errors, as -lm is already specified when compiling. In fact I am using some of those "undefined" functions in my code already, but BSEC can't seem to find them.


    I believe the order of the arguments in your linking command is important for dependencies to be found. Can you confirm if the compilation error persists after placing -lm last (or at least after -lalgobsec)?


    Member

    Re: BSEC library for Azure Sphere

    Thanks for that suggestion: I can confirm that moving the -lm to the end of the library list did resolve those undefined references.

    I will continue to look at using the BSEC library on the M4F core, although this is really not ideal. There's no official support/documentation for using I2C on that core, so I need to do the BME680 measurements on the A7, then shift the data to the M4F for BSEC processing and then shift the BSEC output back up to the A7 for dispatch.

     

    Highlighted
    New Visitor

    Re: BSEC library for Azure Sphere


    @handytech wrote:

    Could you please try the attached release compiled with the requested flasgs (-fPIC -mfloat-abi=hard -fno-short-enums)?

    https://community.bosch-sensortec.com/varuj77995/attachments/varuj77995/bst_community-mems-forum/44/...


    Thanks!  This is exactly what I needed for my application.  Can this be included in future releases?

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist