Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 BSEC Arduino Uno compile error

    BME680 BSEC Arduino Uno compile error

    New Poster

    I am trying to compile to BSEC basic for arduino uno platform. I modified the platform.txt as indicated here : I created a atmega328p folder in src directory and copied the lib.

    now i get the error: 

    /Applications/ skipping incompatible /Users/skumar/Documents/Arduino/libraries/BSEC-Arduino-library-master/src/atmega328p/libalgobsec.a when searching for -lalgobsec
    /Applications/ 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?.



    5 REPLIES 5

    Occasional Contributor

    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





    Please look at the latest library 

    name=BSEC Software Library
    author=Bosch Sensortec
    maintainer=Bosch Sensortec <>
    sentence=Bosch Sensortec Environmental Cluster (BSEC) Software library
    url=<a href="" target="_blank"></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. 


    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 ( . 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.


    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.

    Occasional Contributor

    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).