Hello,
I am using the nrf9160 and I am developing using zephyr. I have an nrf connect project in Segger IDE.
Generally I am able to edit and build my project. The problem arose when I added and linked 2 libraries in CMakeLists.txt which is in my project root directory. So in the same directory as prj.conf and nrf9160_pca100090ns.overlay .
When I have two distinct target_link_libraries I get an error saying zephyr.h: No such file or directory.
When I have one statement I get, cannot find-ldisplay_common, cannot find -ldispplay_hw, Id returned 1 exit status.
See my CMakeLists.txt file here.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
cmake_minimum_required(VERSION 3.8.2)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(DISP)
target_sources(app PRIVATE src/main.c)
target_sources(app PRIVATE src/ssd1315.c)
target_sources(app PRIVATE src/gpio_handler.c)
target_sources(app PRIVATE src/spi_handler.c)
target_sources(app PRIVATE src/i2c_handler.c)
target_sources(app PRIVATE src/max20303_pm.c)
file(GLOB display_hw_SRC "src/display_drivers/*.c" "src/display_drivers/cfgio/*.c" "inc/disp_inc/*.h" "inc/disp_inc/cfgio/*.h" "inc/disp_inc/cfg/*.h")
add_library(display_hw ${display_hw_SRC})
file(GLOB display_common_SRC "src/display_drivers/common/*.c" "inc/disp_inc/*.h" "inc/disp_inc/cfgio/*.h" "inc/disp_inc/cfg/*.h")
add_library(display_common ${display_common_SRC})
zephyr_include_directories(src)
include_directories(src)
include_directories(inc)
Does anybody have any insight into this? Am I supposed to link the libraries in some other CMakeLists.txt file?
Thank you.