cmake: replace PROJECT_SOURCE_DIR with ZEPHYR_BASE

Both variables were used (with the same value) interchangeably
throughout CMake files and per the discussion in GH issue,
ZEPHYR_BASE is preferred.

Also add a comment with explanation of one vs. the other.

Tested by building hello_world for several boards ensuring no errors.

Fixes #7173.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
This commit is contained in:
Alex Tereschenko 2018-06-14 20:21:18 +02:00 committed by Anas Nashif
parent 7688f49065
commit 3c1a78ea0d
76 changed files with 108 additions and 100 deletions

View file

@ -341,9 +341,9 @@ add_custom_target(syscall_macros_h_target DEPENDS ${syscall_macros_h})
add_custom_command( OUTPUT ${syscall_macros_h}
COMMAND
${PYTHON_EXECUTABLE}
${PROJECT_SOURCE_DIR}/scripts/gen_syscall_header.py
${ZEPHYR_BASE}/scripts/gen_syscall_header.py
> ${syscall_macros_h}
DEPENDS ${PROJECT_SOURCE_DIR}/scripts/gen_syscall_header.py
DEPENDS ${ZEPHYR_BASE}/scripts/gen_syscall_header.py
)
@ -365,9 +365,9 @@ set(syscalls_subdirs_trigger ${CMAKE_CURRENT_BINARY_DIR}/misc/generated/syscalls
execute_process(
COMMAND
${PYTHON_EXECUTABLE}
${PROJECT_SOURCE_DIR}/scripts/subfolder_list.py
--directory ${PROJECT_SOURCE_DIR}/include # Walk this directory
--out-file ${syscalls_subdirs_txt} # Write this file
${ZEPHYR_BASE}/scripts/subfolder_list.py
--directory ${ZEPHYR_BASE}/include # Walk this directory
--out-file ${syscalls_subdirs_txt} # Write this file
)
file(STRINGS ${syscalls_subdirs_txt} PARSE_SYSCALLS_PATHS_DEPENDS)
@ -378,7 +378,7 @@ if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL Windows)
# Also On Windows each header file must be monitored as file modifications are not reflected
# on directory level.
file(GLOB_RECURSE PARSE_SYSCALLS_HEADER_DEPENDS ${PROJECT_SOURCE_DIR}/include/*.h)
file(GLOB_RECURSE PARSE_SYSCALLS_HEADER_DEPENDS ${ZEPHYR_BASE}/include/*.h)
else()
# The syscall parsing depends on the folders in order to detect add/removed/modified files.
# When a folder is removed, CMake will try to find a target that creates that dependency.
@ -396,10 +396,10 @@ else()
${syscalls_subdirs_txt}
COMMAND
${PYTHON_EXECUTABLE}
${PROJECT_SOURCE_DIR}/scripts/subfolder_list.py
--directory ${PROJECT_SOURCE_DIR}/include # Walk this directory
--out-file ${syscalls_subdirs_txt} # Write this file
--trigger ${syscalls_subdirs_trigger} # Trigger file that will result in CMake rerun
${ZEPHYR_BASE}/scripts/subfolder_list.py
--directory ${ZEPHYR_BASE}/include # Walk this directory
--out-file ${syscalls_subdirs_txt} # Write this file
--trigger ${syscalls_subdirs_trigger} # Trigger file that will result in CMake rerun
DEPENDS ${PARSE_SYSCALLS_PATHS_DEPENDS}
)
@ -420,9 +420,9 @@ add_custom_command(
${syscalls_json}
COMMAND
${PYTHON_EXECUTABLE}
${PROJECT_SOURCE_DIR}/scripts/parse_syscalls.py
--include ${PROJECT_SOURCE_DIR}/include # Read files from this dir
--json-file ${syscalls_json} # Write this file
${ZEPHYR_BASE}/scripts/parse_syscalls.py
--include ${ZEPHYR_BASE}/include # Read files from this dir
--json-file ${syscalls_json} # Write this file
DEPENDS ${syscalls_subdirs_txt} ${PARSE_SYSCALLS_HEADER_DEPENDS}
)
@ -431,7 +431,7 @@ add_custom_command(OUTPUT include/generated/syscall_dispatch.c ${syscall_list_h}
# Also, some files are written to include/generated/syscalls/
COMMAND
${PYTHON_EXECUTABLE}
${PROJECT_SOURCE_DIR}/scripts/gen_syscalls.py
${ZEPHYR_BASE}/scripts/gen_syscalls.py
--json-file ${syscalls_json} # Read this file
--base-output include/generated/syscalls # Write to this dir
--syscall-dispatch include/generated/syscall_dispatch.c # Write this file

View file

@ -1,5 +1,5 @@
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_include_directories(${PROJECT_SOURCE_DIR}/arch/x86/soc/intel_quark)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_include_directories(${ZEPHYR_BASE}/arch/x86/soc/intel_quark)
zephyr_cc_option(-mcpu=quarkse_em -mno-sdata)

View file

@ -1,4 +1,4 @@
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_cc_option(-mcpu=${GCC_M_CPU})
zephyr_cc_option(-mno-sdata -mdiv-rem -mswap -mnorm)

View file

@ -9,7 +9,7 @@ zephyr_compile_options(
-MMD
-MP
${ARCH_FLAG}
-include ${PROJECT_SOURCE_DIR}/arch/posix/include/posix_cheats.h
-include ${ZEPHYR_BASE}/arch/posix/include/posix_cheats.h
)
zephyr_compile_options_ifdef(CONFIG_COVERAGE

View file

@ -31,7 +31,7 @@ else()
set(GENIDT_EXTRA_ARGS "")
endif()
set(GENIDT ${PROJECT_SOURCE_DIR}/scripts/gen_idt.py)
set(GENIDT ${ZEPHYR_BASE}/scripts/gen_idt.py)
define_property(GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH BRIEF_DOCS " " FULL_DOCS " ")
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH "i386")
@ -134,7 +134,7 @@ if(CONFIG_X86_MMU)
OUTPUT mmu_tables.bin
COMMAND
${PYTHON_EXECUTABLE}
${PROJECT_SOURCE_DIR}/scripts/gen_mmu_x86.py
${ZEPHYR_BASE}/scripts/gen_mmu_x86.py
-i mmulist.bin
-k $<TARGET_FILE:zephyr_prebuilt>
-o mmu_tables.bin
@ -174,7 +174,7 @@ if(CONFIG_GDT_DYNAMIC)
OUTPUT gdt.bin
COMMAND
${PYTHON_EXECUTABLE}
${PROJECT_SOURCE_DIR}/scripts/gen_gdt.py
${ZEPHYR_BASE}/scripts/gen_gdt.py
--kernel $<TARGET_FILE:zephyr_prebuilt>
--output-gdt gdt.bin
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>

View file

@ -1,5 +1,5 @@
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_cc_option(-march=atom)
zephyr_cc_option_fallback(-mtune=atom -mtune=generic)

View file

@ -1,5 +1,5 @@
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_cc_option(-march=pentium)

View file

@ -1,4 +1,4 @@
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_compile_definitions_ifdef(
CONFIG_SOC_QUARK_D2000

View file

@ -1,4 +1,4 @@
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_compile_definitions_ifdef(
CONFIG_SOC_QUARK_SE_C1000

View file

@ -1,5 +1,5 @@
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_cc_option(-march=lakemont -mtune=lakemont -msoft-float)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(soc.c)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources_if_kconfig(pinmux.c)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -3,4 +3,4 @@ zephyr_library_sources(
pinmux.c
dbghdr.c
)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -5,5 +5,5 @@
#
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(pinmux.c)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,5 +1,5 @@
if(CONFIG_UART_GECKO)
zephyr_library()
zephyr_library_sources(board.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
endif()

View file

@ -1,5 +1,5 @@
if(CONFIG_PINMUX_MCUX)
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(pinmux.c)
endif()

View file

@ -1,5 +1,5 @@
if(CONFIG_PINMUX_MCUX)
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(pinmux.c)
endif()

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -6,6 +6,6 @@
if(CONFIG_PINMUX_MCUX_LPC)
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(pinmux.c)
endif()

View file

@ -6,6 +6,6 @@
if(CONFIG_PINMUX_MCUX_LPC)
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(pinmux.c)
endif()

View file

@ -5,5 +5,5 @@
#
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(pinmux.c)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(board.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,5 +1,5 @@
if(CONFIG_PINMUX_MCUX)
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
endif()

View file

@ -1,5 +1,5 @@
if(CONFIG_PINMUX_BEETLE)
zephyr_library()
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(pinmux.c)
endif()

View file

@ -1,4 +1,4 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_sources(clock.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,5 +1,5 @@
if(CONFIG_PINMUX)
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
endif()

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -3,4 +3,4 @@ zephyr_library_sources(
pinmux.c
board.c
)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -1,3 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -72,6 +72,14 @@ set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Application B
set(__build_dir ${CMAKE_CURRENT_BINARY_DIR}/zephyr)
set(PROJECT_BINARY_DIR ${__build_dir})
# CMake's 'project' concept has proven to not be very useful for Zephyr
# due in part to how Zephyr is organized and in part to it not fitting well
# with cross compilation.
# CMake therefore tries to rely as little as possible on project()
# and its associated variables, e.g. PROJECT_SOURCE_DIR.
# It is recommended to always use ZEPHYR_BASE instead of PROJECT_SOURCE_DIR
# when trying to reference ENV${ZEPHYR_BASE}.
set(PROJECT_SOURCE_DIR $ENV{ZEPHYR_BASE})
# Convert path to use the '/' separator

View file

@ -11,7 +11,7 @@
set(GENERATED_DTS_BOARD_H ${PROJECT_BINARY_DIR}/include/generated/generated_dts_board.h)
set(GENERATED_DTS_BOARD_CONF ${PROJECT_BINARY_DIR}/include/generated/generated_dts_board.conf)
set_ifndef(DTS_SOURCE ${BOARD_ROOT}/boards/${ARCH}/${BOARD_FAMILY}/${BOARD}.dts)
set_ifndef(DTS_COMMON_OVERLAYS ${PROJECT_SOURCE_DIR}/dts/common/common.dts)
set_ifndef(DTS_COMMON_OVERLAYS ${ZEPHYR_BASE}/dts/common/common.dts)
message(STATUS "Generating zephyr/include/generated/generated_dts_board.h")
@ -50,14 +50,14 @@ if(CONFIG_HAS_DTS)
COMMAND ${CMAKE_C_COMPILER}
-x assembler-with-cpp
-nostdinc
-I${PROJECT_SOURCE_DIR}/arch/${ARCH}/soc
-isystem ${PROJECT_SOURCE_DIR}/include
-isystem ${PROJECT_SOURCE_DIR}/dts/${ARCH}
-isystem ${PROJECT_SOURCE_DIR}/dts
-I${ZEPHYR_BASE}/arch/${ARCH}/soc
-isystem ${ZEPHYR_BASE}/include
-isystem ${ZEPHYR_BASE}/dts/${ARCH}
-isystem ${ZEPHYR_BASE}/dts
-include ${AUTOCONF_H}
${DTC_INCLUDE_FLAG_FOR_DTS} # include the DTS source and overlays
-I${PROJECT_SOURCE_DIR}/dts/common
-I${PROJECT_SOURCE_DIR}/drivers
-I${ZEPHYR_BASE}/dts/common
-I${ZEPHYR_BASE}/drivers
-undef -D__DTS__
-P
-E ${ZEPHYR_BASE}/misc/empty_file.c
@ -89,7 +89,7 @@ if(CONFIG_HAS_DTS)
if(EXISTS ${DTS_BOARD_FIXUP_FILE})
set(DTS_BOARD_FIXUP ${DTS_BOARD_FIXUP_FILE})
endif()
set_ifndef(DTS_SOC_FIXUP_FILE ${PROJECT_SOURCE_DIR}/arch/${ARCH}/soc/${SOC_PATH}/dts.fixup)
set_ifndef(DTS_SOC_FIXUP_FILE ${ZEPHYR_BASE}/arch/${ARCH}/soc/${SOC_PATH}/dts.fixup)
if(EXISTS ${DTS_SOC_FIXUP_FILE})
set(DTS_SOC_FIXUP ${DTS_SOC_FIXUP_FILE})
endif()
@ -102,9 +102,9 @@ if(CONFIG_HAS_DTS)
set(DTS_FIXUPS --fixup ${DTS_FIXUPS})
endif()
set(CMD_EXTRACT_DTS_INCLUDES ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/dts/extract_dts_includes.py
set(CMD_EXTRACT_DTS_INCLUDES ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/dts/extract_dts_includes.py
--dts ${BOARD}.dts_compiled
--yaml ${PROJECT_SOURCE_DIR}/dts/bindings
--yaml ${ZEPHYR_BASE}/dts/bindings
${DTS_FIXUPS}
--keyvalue ${GENERATED_DTS_BOARD_CONF}
--include ${GENERATED_DTS_BOARD_H}

View file

@ -1,7 +1,7 @@
add_library(PTHREAD INTERFACE)
target_include_directories(PTHREAD INTERFACE ${PROJECT_SOURCE_DIR}/include/posix)
target_include_directories(PTHREAD INTERFACE ${ZEPHYR_BASE}/include/posix)
zephyr_library()
zephyr_library_sources(pthread_common.c)