Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BSEC 1.4.7.4 compilation error on ESP32 1.0.3-rc1

    BSEC 1.4.7.4 compilation error on ESP32 1.0.3-rc1

    KoRba88
    New Poster

    Hi

    I have followed the instruction. My platform.txt

    These can be overridden in platform.local.txt
    compiler.c.extra_flags=
    compiler.c.elf.extra_flags=
    #compiler.c.elf.extra_flags=-v
    compiler.cpp.extra_flags=
    compiler.S.extra_flags=
    compiler.ar.extra_flags=
    compiler.elf2hex.extra_flags=
    compiler.libraries.ldflags=

     

    recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {build.exception_flags} -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} {compiler.libraries.ldflags} -Wl,--end-group "-L{build.path}"

    but Arduino IDE gives an error xtensa-esp32-elf-gcc: error: {build.exception_flags}: No such file or directory

    1.4.7.2 with arduino-builder.exe from bosch works perfectly but now i can't find anywhere these arduino-builder.exe, its obsolete?

    7 REPLIES 7

    handytech
    Community Moderator
    Community Moderator

    In the current latest version of the Arduino IDE (1.8.9), there is no need to manually update the arduino-builder.exe as this version now natively supports all the features needed to run BSEC.

    The error message also points towards another type of failure. The "recipe.c.combine.pattern=[...]" that you shared seems to be copy-pasted from our example for the ESP8266 core, but the error indicates that you are using an ESP32 core.

    Each platform is unique and unfortunaly needs to be edited accordingly. In the latest (pre-)release of the ESP32 core, the original line looks like this:

    ## Combine gc-sections, archives, and objects
    recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
    

     Therefore you would need to add the compiler.libraries.ldflags in that section, for example like so:

    ## Combine gc-sections, archives, and objects
    recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} {compiler.libraries.ldflags} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"

    Also note that "build.exception_flags" does not appear in the original platform.txt file.

    Thanks handytech

    its worked for me until now when i've updated esp32 arduino core to the 1.04 version. Now its seems that the linker did not see a library beacuse i have following errors

    \libraries\BSEC\bsec.cpp.o:(.literal._ZN4Bsec11beginCommonEv+0x0): undefined reference to `bsec_init'

    \libraries\BSEC\bsec.cpp.o:(.literal._ZN4Bsec11beginCommonEv+0x4): undefined reference to `bsec_get_version'

    Do you or somebody know what's changed and why previous solution does'nt work now?

    I  have followed everything and getting the same errors was this ever solved

    Could you share the version of the tools you are using, and exactly what is your error message?

    Have you successfully created the "compiler.libraries.ldflags=" variable to your current platform.txt file, and added the "{compiler.libraries.ldflags}" accordingly in the "recipe.c.combine.pattern" section?

    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