Bosch Sensortec Community

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

    Error compiling BSEC on ESP8266 with Arduino IDE

    handytech
    Community Moderator

    Re: Error compiling BSEC on ESP8266 with Arduino IDE

    I was running Arduino IDE 1.8.10 and ESP8266 core 2.6.3, but even after updating my setup to 1.8.11 and 2.7.1 respectively, I cannot reproduce your error yet.

    From your console log I can comment that:

    • "-lalgobsec" appears twice in the linker command, this is weird,
    • in the same command, the linker is not including "bsec.cpp.o" nor "bme680.c.o" which I believe is causing the "undefined reference" error.

    For example I would expect something more like this (changes in red) :

    "C:\\Users\\david\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-4-b40a506/bin/xtensa-lx106-elf-gcc" -fno-exceptions -Wl,-Map "-Wl,C:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158/basic.ino.map" -g -w -Os -nostdlib -Wl,--no-check-sections -u app_entry -u _printf_float -u _scanf_float -Wl,-static "-LC:\\Users\\david\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.1/tools/sdk/lib" "-LC:\\Users\\david\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.1/tools/sdk/lib/NONOSDK22x_190703" "-LC:\\Users\\david\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.1/tools/sdk/ld" "-LC:\\Users\\david\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.7.1/tools/sdk/libc/xtensa-lx106-elf/lib" -Teagle.flash.4m2m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o "C:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158/basic.ino.elf" -Wl,--start-group "C:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158\\sketch\\basic.ino.cpp.o" "C:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158\\libraries\\BSEC_Software_Library\\bsec.cpp.o" "C:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158\\libraries\\BSEC_Software_Library\\bme680\\bme680.c.o" "C:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158\\core\\core.a" -lhal -lphy -lpp -lnet80211 -llwip2-536-feat -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc "-LC:\\Users\\david\\Documents\\Arduino\\libraries\\BSEC-Arduino-library-1.5.1474\\src\\esp8266" -lalgobsec -lalgobsec -Wl,--end-group "-LC:\\Users\\david\\AppData\\Local\\Temp\\arduino_build_524158"
    

     

    Davide
    Member

    Re: Error compiling BSEC on ESP8266 with Arduino IDE

    Please, could you share your platform.txt and eagle...etc... files?
    Maybe replacing them I got it working... at least as regards the libalgobsec library.
    About linker that not include "bsec.cpp.o" and "bme680.c.o" what can I do?
    handytech
    Community Moderator

    Re: Error compiling BSEC on ESP8266 with Arduino IDE

    Please find attached the files used in my setup, respectively found under "C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.1\platform.txt" and "C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.1\tools\sdk\ld\eagle.app.v6.common.ld.h" by default.

    Davide
    Member

    Re: Error compiling BSEC on ESP8266 with Arduino IDE

    Thank you handytech.

    But I can't find the files... it's my problem or on the forum the files attached to the messages do not appear?

    Even the logs that I tried to attach in the previous message are not in the discussion...

    handytech
    Community Moderator

    Re: Error compiling BSEC on ESP8266 with Arduino IDE

    I just realized my attachment went missing too, I started investigating.

    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