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
  • Hello,

    Did the compiler say something before "FATAL ERROR:..." If so, can you paste what it said before that (anything that doesn't look like a build success line).

    Also, I don't know whether this is actually an issue, but i have seen that some users have ahd trouble with this earlier. Try moving your project folder to the same drive as your NCS installation (c: in your case). 

    Let me know if that doesn't solve the issue.

    Best regards,

    Edvin

  • cmake_minimum_required(VERSION 3.20.0)
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(hello_world)
    target_sources(app PRIVATE src/main.c)
    target_sources(app PRIVATE src/bsec_integration.c)
    target_sources(app PRIVATE src/bme680.c)
    zephyr_library_include_directories(src)

    by adding last line problem not solved. This link is available on nordic official , by this you get more details about  bsec_integration.h and bsec_integration.c.

    i on this page , how to set configuration for BSEC is also available , but i am enable to understand . please go through to the link. i need your support to understand it.  

    developer.nordicsemi.com/.../sensor_module.html

  • Mohit Nama said:
    i on this page , how to set configuration for BSEC is also available , but i am enable to understand . please go through to the link. i need your support to understand it.  

    I think you should focus on getting the project to compile before you start tweaking configurations. 

    I still don't have access to the bsec files. 

    Edvin said:

    These all look quite similar, so solving one will either solve all, or at least show how to solve all, so let us look at the first one, on line 140 in bsec_integration.c.

    You are using a parameter/function called bsec_update_subscription. What is this? Is it a function or a parameter? And where is it defined? I see that you include bsec_integration.h from main.c. Do you include bsec_integration.h from bsec_integration.c as well?

    Can you please check this?

Reply
  • Mohit Nama said:
    i on this page , how to set configuration for BSEC is also available , but i am enable to understand . please go through to the link. i need your support to understand it.  

    I think you should focus on getting the project to compile before you start tweaking configurations. 

    I still don't have access to the bsec files. 

    Edvin said:

    These all look quite similar, so solving one will either solve all, or at least show how to solve all, so let us look at the first one, on line 140 in bsec_integration.c.

    You are using a parameter/function called bsec_update_subscription. What is this? Is it a function or a parameter? And where is it defined? I see that you include bsec_integration.h from main.c. Do you include bsec_integration.h from bsec_integration.c as well?

    Can you please check this?

Children
No Data
Related