Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BSEC library structure might have changed in BSEC_1.4.8.0_Generic_Release #5

Open
frippe75 opened this issue Nov 21, 2020 · 2 comments

Comments

@frippe75
Copy link

During a build I get:

CMake Error at /workdir/ncs/nrf/zephyr/cmake/extensions.cmake:372 (add_library):
  Cannot find source file:

    /workdir/ncs/nrf/ext/BSEC_1.4.8.0_Generic_Release/examples/bsec_integration.c

Looking at 'src/env_sensors/CMakeLists.txt'

set(bsec_dir ${CONFIG_BOSCH_BSEC_LIBRARY_PATH})
		target_include_directories(app PRIVATE ${bsec_dir}/API)
		target_include_directories(app PRIVATE ${bsec_dir}/examples)
		target_sources(app PRIVATE ${bsec_dir}/examples/bsec_integration.c)

And comparing that to the layout of the library an extra directory has been added in 'bsec_iot_example':

/workdir/ncs/nrf/ext/BSEC_1.4.8.0_Generic_Release/examples/bsec_iot_example
/workdir/ncs/nrf/ext/BSEC_1.4.8.0_Generic_Release/examples/bsec_iot_example/bsec_integration.h
/workdir/ncs/nrf/ext/BSEC_1.4.8.0_Generic_Release/examples/bsec_iot_example/bme680.c

Didn't do a PR since I couldn't determine if this is an error on my part or not.

@frippe75
Copy link
Author

Now it builds...

diff --git a/src/env_sensors/CMakeLists.txt b/src/env_sensors/CMakeLists.txt
index bc90e21..2b223ca 100644
--- a/src/env_sensors/CMakeLists.txt
+++ b/src/env_sensors/CMakeLists.txt
@@ -15,11 +15,11 @@ if (CONFIG_USE_BME680_BSEC)
                if(NOT EXISTS "${BSEC_LIB_DIR}/libalgobsec.a")
                        assert(0 "Could not find BSEC library")
                endif()
-               target_include_directories(app PRIVATE ${bsec_dir}/API)
-               target_include_directories(app PRIVATE ${bsec_dir}/examples)
+               #target_include_directories(app PRIVATE ${bsec_dir}/API)
+               target_include_directories(app PRIVATE ${bsec_dir}/examples/bsec_iot_example)
                target_include_directories(app PRIVATE ${BSEC_INCLUDE_DIR})
-               target_sources(app PRIVATE ${bsec_dir}/examples/bsec_integration.c)
-               target_sources(app PRIVATE ${bsec_dir}/API/bme680.c)
+               target_sources(app PRIVATE ${bsec_dir}/examples/bsec_iot_example/bsec_integration.c)
+               target_sources(app PRIVATE ${bsec_dir}/examples/bsec_iot_example/bme680.c)
 
                add_library(bsec_lib STATIC IMPORTED GLOBAL)
                add_dependencies(bsec_lib math_lib bsec_target)

@mcallistertad
Copy link
Owner

Thanks for making me aware of this. Could you please submit a pull request and I will merge your changes.
Unfortunately I can't include the BSEC blob due to its license agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants