Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME688 BSEC2.2.0.0 pi3g segmentation fault

    BME688 BSEC2.2.0.0 pi3g segmentation fault

    Prop4et
    Established Member

    I adapted the pi3g library for reading the values of a sensor with a raspberry pi. To do so I changed the BSEC_SAMPLE_RATE_HIGH_PERFORMANCE to BSEC_SAMPLE_RATE_SCAN and the BSEC_OUTPUT_COMPENSATED_GAS was commented out in the switch and removed from the virtual sensor array (also shifted the last virtual sensor of 1 position because of that).

    After that I installed everything following the pi3g instruction but when running the program to take samples to then pass to the bme ai studio software in goes into segmentation fault. I checked the issue on github and updated the amount of memory allocated for the process and the number of core as suggested there, but nothing seems to change. 

    After that i tried to check what the Raspberry Pi 400 runs and it seems that the architecture is an ARMV8, so i tried to change the configuration of the setup.py to use the PiThree_ARMV8 instead of the default PiThree_ARMV6 and now i'm stuck on this compilation problem:


    /usr/bin/ld: BSEC_2.2.0.0_Generic_Release_30052022/algo/normal_version/bin/RaspberryPi/PiThree_ArmV8/libalgobsec.a(GasHumidityBaselineTracker.o)(.text+0x20e4): unresolvable R_ARM_CALL relocation against symbol `truncf@@GLIBC_2.4'
    /usr/bin/ld: final link failed: symbol needs debug section which does not exist
    collect2: error: ld returned 1 exit status
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    Checking on stack overflow it seems like some flags are missing for the gcc so i'll try that, but in the meantime i'd like to know if someone faced the same issue i'm facing and was able to overcome it.

    11 REPLIES 11

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Prop4et,

    Could we know detailed information about your host architecture?

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Prop4et,

    Could you give further feedback? Thanks.

    Prop4et
    Established Member

    It compiles the pithree version and by forcing a call to the library function it starts to record data that is kinda real. I stuck to that because the problem i'm facing is now related to loading the data into bme ai studio, eventhough the format is right, the software doesn't seem to load the whole duration (about 4 hours) but only an hour of sampling.

    Because of that i bought a development kit to at least be able to create an algorithm and i manage to do so.

    When i have to get back to the pi i'll let you know everything

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Prop4et,

    Do you mean you changed you hardware platform to others and BSEC2 software had been worked well on you new platform?

    Prop4et
    Established Member

    I mean i am still using the same raspberry pi 4B that i was using at the beginning, but i changed the version of the library. The library i am using is the one compiled for the PiThree_ArmV6. This one is compiled by the raspberry pi and it runs. The only issue i have with this is that if i want to read values from the bsec library i need to force a call to a library function before starting the get data process used for sampling by the pi3g code. Otherwise i have TPH readings that are fakes (for example H is always 100). I know they can be ignored when generating the algorithm, but i was wondering why there is this behaviour.

    If i try and compile the PiFour_ArmV8 i get an error telling me that it can't be compiled, and by searching the internet it seems like the error is returned when the hardware is not correct for the library (.a file) i am using.

    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