Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 BSEC Arduino Uno compile error

    New Poster

    BME680 BSEC Arduino Uno compile error

    I am trying to compile to BSEC basic for arduino uno platform. I modified the platform.txt as indicated here :https://github.com/BoschSensortec/BSEC-Arduino-library. I created a atmega328p folder in src directory and copied the lib.

    now i get the error: 

    /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: skipping incompatible /Users/skumar/Documents/Arduino/libraries/BSEC-Arduino-library-master/src/atmega328p/libalgobsec.a when searching for -lalgobsec
    /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: cannot find -lalgobsec

    collect2: error: ld returned 1 exit status

    Modified the platform.txt to include compiler.libraries.ldflags.

    recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} "{build.path}/{archive_file}" "-L{build.path}" -lm

    I am using this on MAC, installed the latest arduino uno (1.8.9).

    I understand the library libalgobsec.a is part of the megaAVR family which includes atmega series, which means it should work for atmega328p or uno platform.

    Any suggestions on how to fix this?.

    Kumar

     

    4 REPLIES 4
    Community Moderator

    Re: BME680 BSEC Arduino Uno compile error

    Seen from the error:

    skipping incompatible /Users/skumar/Documents/Arduino/libraries/BSEC-Arduino-library-master/src/atmega328p/libalgobsec.a when searching for -lalgobsec

    It seems the .a is not compatible with the project. Make sure to copy the correct lib.

    Also, pay attention to the file library properties, and check if you need to modify them depending on your platform

    1.png

     

    New Poster

    Re: BME680 BSEC Arduino Uno compile error

    Hi,

     

    Please look at the latest library 

    name=BSEC Software Library
    version=1.2.1474
    author=Bosch Sensortec
    maintainer=Bosch Sensortec <contact@bosch-sensortec.com>
    sentence=Bosch Sensortec Environmental Cluster (BSEC) Software library
    url=<a href="https://www.bosch-sensortec.com/en/bst/products/all_products/bsec" target="_blank">https://www.bosch-sensortec.com/en/bst/products/all_products/bsec</a>
    paragraph=  for use with the BME680 has been conceptualized to provide higher-level signal processing and fusion for the BME680. The library receives compensated sensor values from the sensor API. It processes the BME680 signals to provide the requested sensor outputs. 
    category=Sensors
    architectures=samd,sam,esp8266,nrf52,esp32,avr
    includes=bsec.h
    precompiled=true
    ldflags=-lalgobsec

     

    We can see that avr is included.  I used the avr-readelf command on the avr library. I can see that the avr library provided by bosch is for avr6 architecture which includes only the atmega256X series of chips.  The atmega328p is part of the avr5 series, sadly there are a lot of microcontroller in avr5 family.

    I think bosch needs to update the table which indicates the list of supported microcontroller (https://github.com/BoschSensortec/BSEC-Arduino-library) . The MegaAVR family includes avr5, avr51 and avr6 series , all belong to avr mega / atmega.

    Also the same for MSP430, msp430 lib is built for msp430X and not the generic msp430 which includes msp430g2553 and so on.

    Kumar

    Community Moderator
    Community Moderator

    Re: BME680 BSEC Arduino Uno compile error

    Thanks for the insights on different types of AVR devices.

    For the 328P, seeing as this is an 8-bit MCU with only 32kB of flash, even if we did have a library compiled for the right target, I doubt there would be enough space to fit the BSEC library + the Math library required for floating point operations, let alone have any space left for the BME680 sensor API and the application itself.
    Community Moderator

    Re: BME680 BSEC Arduino Uno compile error

    Suggest to use either the Arduino Mega 2560 or one of the newer Arduino boards with an ARM Cortex or Xtensa Silica MCU (ESP8266, ESP32).

    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