This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMake script for add eternal libaray ( BSEC ) to test Bosch sensor raeding?

hello,

i have downloaded    ( BSEC )    library from https://www.bosch-sensortec.com/software-tools/software/bsec/  for read sensor data . now want to test the code by build and flashing it with VS code for thingy 91 borad.

CMamke  file have 

FILE(GLOB bsec_integration src/*.c)

target_sources(app PRIVATE src/bsec_integration.c)
target_sources(app PRIVATE src/bme680.c)

i have add c file and header file in scr folder .

on build shows error 

FATAL ERROR: command exited with status 1: 'c:\Users\mohit\ncs\v1.9.1\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=c:\Users\mohit\ncs\v1.9.1\toolchain\opt\bin\python.exe' '-Be:\Nordic_Acadmey\bsec_integration\build_1' '-Se:\Nordic_Acadmey\bsec_integration' -GNinja -DBOARD=thingy91_nrf9160 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=NONE.

please suggest

Parents
  • bsec.rar

    thank you sir ,  As I already explain about my goal and approach .this file is modified by me for test bosc sensor .

    and file attached below is official sample code from bosch

    bsec_1-4-8-0_generic_release_updated_v3.zip  

  • yes Sir, this file is same and i am getting same error.

    That time i have no solution so i using hit and trial method so , error keep changing with my effort . 

    I don't make any changes in rest files , i changed only CMake file script .I you can modify it , my desire is same as in my first post . 

    i also shared CMake file in my old post you can compare it with ZIP i make several changes in only in CMake file. 

  • Ok,

    Can you please upload a project that gives the same error that you said you had initially? The one where it said this:

    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(bsec_integration.c.obj): in function `bme680_bsec_update_subscription':
    C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:140: undefined reference to `bsec_update_subscription'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(bsec_integration.c.obj): in function `bme680_bsec_process_data':
    C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:417: undefined reference to `bsec_do_steps'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(bsec_integration.c.obj): in function `bsec_iot_init':
    C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:186: undefined reference to `bsec_init'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:207: undefined reference to `bsec_set_state'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:196: undefined reference to `bsec_set_configuration'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(bsec_integration.c.obj): in function `bsec_iot_loop':
    C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:539: undefined reference to `bsec_get_state'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:521: undefined reference to `bsec_sensor_control'

Reply
  • Ok,

    Can you please upload a project that gives the same error that you said you had initially? The one where it said this:

    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(bsec_integration.c.obj): in function `bme680_bsec_update_subscription':
    C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:140: undefined reference to `bsec_update_subscription'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(bsec_integration.c.obj): in function `bme680_bsec_process_data':
    C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:417: undefined reference to `bsec_do_steps'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(bsec_integration.c.obj): in function `bsec_iot_init':
    C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:186: undefined reference to `bsec_init'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:207: undefined reference to `bsec_set_state'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:196: undefined reference to `bsec_set_configuration'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(bsec_integration.c.obj): in function `bsec_iot_loop':
    C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:539: undefined reference to `bsec_get_state'
    c:/users/mohit/nrf/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\mohit\nrf\v1.9.1\Nordic_Acadmey\bsec\src\bsec_integration.c:521: undefined reference to `bsec_sensor_control'

Children
No Data
Related