Klievan
February 28, 2023, 12:58pm
#1
I’m building for the nrf52840dk and I’m getting the following error:
/Users/ivanherrera/projects/iosa/firmware-nordic-nrf52840dk-nrf5340dk/firmware-sdk/sensor_aq.h:36:2: error: #error "EI_SENSOR_AQ_STREAM not defined, and not on POSIX system. Please specify the EI_SENSOR_AQ_STREAM macro"
. I have not edited the code, just cloned the repo and tried to build using NCS 1.9.1.
This is my full build-log:
build.log
Executing task: nRF Connect: Build: firmware-nordic-nrf52840dk-nrf5340dk/build (active)
Building firmware-nordic-nrf52840dk-nrf5340dk
west build --build-dir /Users/ivanherrera/projects/iosa/firmware-nordic-nrf52840dk-nrf5340dk/build /Users/ivanherrera/projects/iosa/firmware-nordic-nrf52840dk-nrf5340dk
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /opt/nordic/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/ivanherrera/projects/iosa/firmware-nordic-nrf52840dk-nrf5340dk
-- Using NCS Toolchain 1.9.1 for building. (/opt/nordic/ncs/v1.9.1/toolchain/cmake)
-- Zephyr version: 2.7.99 (/opt/nordic/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
This file has been truncated. show original
Any idea on where I’m going wrong?
I ran into the same issue when I was building on a Windows machine. You can get around it by changing line 32 of sensor_aq.h from
#if !defined(EI_SENSOR_AQ_STREAM) && (defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)))
to
#if !defined(EI_SENSOR_AQ_STREAM)
I also deleted the #elif and #error lines 35 and 36, and then I was able to get it to compile.
2 Likes