UPDATES after original posting:
I now remember having the same problem described below, once before on my windows installation.
At that time I decided to switch and reinstall everything in a virtual Ubuntu dedicated only to this project,
meaning that I never solved the original problem !!
I have now found the problem and it it turns out that several folder in the zephyr/include was empty (including the dt-bindings/*.*).
After a git restore everything works fine !!
Now I'm sitting back wondering if some of the scripts causes this problem in rare situations !! ??
/Jesper
-------------------------------
I'm suddenly unable til build any of my nrf9160 project and I have no idea what is wrong !!
I switch and tried build a simple hello-world that used to work but gets the same build error as listed below.
And if i try to load/build the same from SES , it the same.
I have seen problems when using west 0.7.0 and have manually switch to use 0.6.3
$ cmake -B build -GNinja -DBOARD=nrf9160_pca20035ns
$ west build -t menuconfig
$ west build -p auto -b nrf9160_pca20035ns
$ west build
$ west build -- west build: build configuration: source directory: /home/jesper/Desktop/Projects/nordic/ncs/nrf/samples/icarus/hello_world build directory: /home/jesper/Desktop/Projects/nordic/ncs/nrf/samples/icarus/hello_world/build (created) BOARD: nrf9160_pca20035ns (origin: configfile) -- west build: generating a build system -- Zephyr version: 2.1.99 -- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.9", minimum required is "3.6") -- Selected BOARD nrf9160_pca20035ns -- Found west: /home/jesper/.local/bin/west (found suitable version "0.6.3", minimum required is "0.6.0") -- Loading /home/jesper/Desktop/Projects/nordic/ncs/nrf/boards/arm/nrf9160_pca20035/nrf9160_pca20035ns.dts as base In file included from /home/jesper/Desktop/Projects/nordic/ncs/zephyr/dts/arm/nordic/nrf9160ns_sica.dtsi:8, from /home/jesper/Desktop/Projects/nordic/ncs/nrf/boards/arm/nrf9160_pca20035/nrf9160_pca20035ns.dts:8, from <command-line>: /home/jesper/Desktop/Projects/nordic/ncs/zephyr/dts/arm/nordic/nrf9160ns.dtsi:8:10: fatal error: dt-bindings/i2c/i2c.h: No such file or directory 8 | #include <dt-bindings/i2c/i2c.h> | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. CMake Error at /home/jesper/Desktop/Projects/nordic/ncs/zephyr/cmake/dts.cmake:140 (message): command failed with return code: 1 Call Stack (most recent call first): /home/jesper/Desktop/Projects/nordic/ncs/zephyr/cmake/app/boilerplate.cmake:460 (include) CMakeLists.txt:5 (include) -- Configuring incomplete, errors occurred! ERROR: command exited with status 1: /snap/bin/cmake -B/home/jesper/Desktop/Projects/nordic/ncs/nrf/samples/icarus/hello_world/build -S/home/jesper/Desktop/Projects/nordic/ncs/nrf/samples/icarus/hello_world -GNinja -DBOARD=nrf9160_pca20035ns
Building twice (without deleting build folder) gives this
$ west build -- west build: build configuration: source directory: /home/jesper/Desktop/Projects/icarus/hello_world build directory: /home/jesper/Desktop/Projects/nordic/ncs/nrf/samples/icarus/hello_world/build BOARD: nrf9160_pca20035ns (origin: CMakeCache.txt) -- west build: building application Error: could not find CMAKE_PROJECT_NAME in Cache
main.c
#include <zephyr.h> #include <kernel_structs.h> #include <sys/printk.h> #include <stdio.h> void main(void) { printf("Hello World\n"); }
prj.conf
# General config CONFIG_ASSERT=y
.west/config
[manifest] path = nrf [build] board = nrf9160_pca20035ns