09-07-2019 10:10 AM
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
09-09-2019 10:20 AM
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
09-09-2019 10:38 AM
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
09-09-2019 11:01 AM
09-10-2019 04:09 AM
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).