cmake: Use path-corrected version of ZEPHYR_BASE
Instead of accessing the environment variable ZEPHYR_BASE every time we require accessing the source code root, use an intermediate variable that has OS path separators correctly set to '/' to avoid issues on Windows. Note: This removes the ZEPHYR_SOURCE_DIR CMake variable. External applications using that will need to change to use the new ZEPHYR_BASE variable. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
e09646ab12
commit
7d764b35f3
|
@ -279,7 +279,7 @@ else()
|
|||
set(LINKER_SCRIPT ${BOARD_DIR}/linker.ld)
|
||||
if(NOT EXISTS ${LINKER_SCRIPT})
|
||||
# If not available, try an SoC specific linker file
|
||||
set(LINKER_SCRIPT $ENV{ZEPHYR_BASE}/arch/${ARCH}/soc/${SOC_PATH}/linker.ld)
|
||||
set(LINKER_SCRIPT ${ZEPHYR_BASE}/arch/${ARCH}/soc/${SOC_PATH}/linker.ld)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -348,7 +348,7 @@ add_custom_command(OUTPUT include/generated/syscall_dispatch.c ${syscall_list_h}
|
|||
# Generate offsets.c.obj from offsets.c
|
||||
# Generate offsets.h from offsets.c.obj
|
||||
|
||||
set(OFFSETS_C_PATH $ENV{ZEPHYR_BASE}/arch/${ARCH}/core/offsets/offsets.c)
|
||||
set(OFFSETS_C_PATH ${ZEPHYR_BASE}/arch/${ARCH}/core/offsets/offsets.c)
|
||||
set(OFFSETS_O_PATH ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/offsets.dir/arch/${ARCH}/core/offsets/offsets.c.obj)
|
||||
set(OFFSETS_H_PATH ${PROJECT_BINARY_DIR}/include/generated/offsets.h)
|
||||
|
||||
|
@ -361,7 +361,7 @@ add_dependencies( offsets
|
|||
|
||||
add_custom_command(
|
||||
OUTPUT ${OFFSETS_H_PATH}
|
||||
COMMAND ${PYTHON_EXECUTABLE} $ENV{ZEPHYR_BASE}/scripts/gen_offset_header.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/gen_offset_header.py
|
||||
-i ${OFFSETS_O_PATH}
|
||||
-o ${OFFSETS_H_PATH}
|
||||
DEPENDS offsets
|
||||
|
@ -612,7 +612,7 @@ if(CONFIG_GEN_ISR_TABLES)
|
|||
$<TARGET_FILE:zephyr_prebuilt>
|
||||
isrList.bin
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
$ENV{ZEPHYR_BASE}/arch/common/gen_isr_tables.py
|
||||
${ZEPHYR_BASE}/arch/common/gen_isr_tables.py
|
||||
--output-source isr_tables.c
|
||||
--intlist isrList.bin
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--debug>
|
||||
|
@ -624,8 +624,8 @@ if(CONFIG_GEN_ISR_TABLES)
|
|||
endif()
|
||||
|
||||
if(CONFIG_USERSPACE)
|
||||
set(GEN_KOBJ_LIST $ENV{ZEPHYR_BASE}/scripts/gen_kobject_list.py)
|
||||
set(PROCESS_GPERF $ENV{ZEPHYR_BASE}/scripts/process_gperf.py)
|
||||
set(GEN_KOBJ_LIST ${ZEPHYR_BASE}/scripts/gen_kobject_list.py)
|
||||
set(PROCESS_GPERF ${ZEPHYR_BASE}/scripts/process_gperf.py)
|
||||
|
||||
set(OBJ_LIST kobject_hash.gperf)
|
||||
set(OUTPUT_SRC_PRE kobject_hash_preprocessed.c)
|
||||
|
@ -792,7 +792,7 @@ set(post_build_commands "")
|
|||
|
||||
list_append_ifdef(CONFIG_CHECK_LINK_MAP
|
||||
post_build_commands
|
||||
COMMAND ${PYTHON_EXECUTABLE} $ENV{ZEPHYR_BASE}/scripts/check_link_map.py ${KERNEL_MAP_NAME}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/check_link_map.py ${KERNEL_MAP_NAME}
|
||||
)
|
||||
|
||||
list_append_ifdef(
|
||||
|
@ -863,7 +863,7 @@ if(CONFIG_OUTPUT_PRINT_MEMORY_USAGE)
|
|||
endif()
|
||||
|
||||
if(EMU_PLATFORM)
|
||||
include($ENV{ZEPHYR_BASE}/cmake/emu/${EMU_PLATFORM}.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/emu/${EMU_PLATFORM}.cmake)
|
||||
else()
|
||||
add_custom_target(run
|
||||
COMMAND
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
zephyr_include_directories($ENV{ZEPHYR_BASE}/drivers)
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
zephyr_sources(soc.c)
|
||||
zephyr_sources_ifdef(CONFIG_GPIO soc_gpio.c)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
zephyr_include_directories($ENV{ZEPHYR_BASE}/drivers)
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
zephyr_sources(
|
||||
soc.c
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
zephyr_include_directories($ENV{ZEPHYR_BASE}/drivers)
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
zephyr_sources(
|
||||
soc.c
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
zephyr_include_directories($ENV{ZEPHYR_BASE}/drivers)
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
zephyr_sources(
|
||||
soc.c
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
zephyr_include_directories($ENV{ZEPHYR_BASE}/drivers)
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
zephyr_sources(
|
||||
soc.c
|
||||
)
|
||||
|
|
|
@ -10,5 +10,5 @@ board_runner_args(dfu-util "--pid=8087:0aba" "--alt=sensor_core")
|
|||
set(PRE_LOAD targets 1)
|
||||
board_runner_args(openocd "--cmd-pre-load=\"${PRE_LOAD}\"" "--gdb-port=3334")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
set(PRE_LOAD targets 1)
|
||||
board_runner_args(openocd "--cmd-pre-load=\"${PRE_LOAD}\"")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
board_runner_args(pyocd "--target=nrf52")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
board_runner_args(dfu-util "--pid=8087:0aba" "--alt=ble_core")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/bossac.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2017 Google LLC.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
board_runner_args(pyocd "--target=nrf51")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -10,6 +10,6 @@ endif()
|
|||
board_runner_args(jlink "--device=MK64FN1M0xxx12")
|
||||
board_runner_args(pyocd "--target=k64f")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -10,5 +10,5 @@ endif()
|
|||
board_runner_args(jlink "--device=MKL25Z128xxx4")
|
||||
board_runner_args(pyocd "--target=kl25z")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
|
|
|
@ -10,5 +10,5 @@ endif()
|
|||
board_runner_args(jlink "--device=MKW41Z512xxx4")
|
||||
board_runner_args(pyocd "--target=kw41z4")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
|
|
|
@ -10,5 +10,5 @@ endif()
|
|||
board_runner_args(pyocd "--target=k64f")
|
||||
board_runner_args(jlink "--device=MK64FN1M0xxx12")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
|
|
|
@ -10,5 +10,5 @@ endif()
|
|||
board_runner_args(jlink "--device=MKW40Z160xxx4")
|
||||
board_runner_args(pyocd "--target=kw40z4")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
#
|
||||
|
||||
board_runner_args(jlink "--device=Cortex-M7")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
board_runner_args(pyocd "--target=nrf51")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
board_runner_args(nrfjprog "--nrf-family=NRF51")
|
||||
board_runner_args(jlink "--device=nrf51" "--speed=4000")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
board_runner_args(pyocd "--target=nrf51")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
board_runner_args(nrfjprog "--nrf-family=NRF52")
|
||||
board_runner_args(jlink "--device=nrf52" "--speed=4000")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
board_runner_args(pyocd "--target=nrf52")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
board_runner_args(nrfjprog "--nrf-family=NRF52")
|
||||
board_runner_args(jlink "--device=nrf52" "--speed=4000")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
board_runner_args(pyocd "--target=nrf52")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
set(POST_VERIFY atsamv gpnvm set 1)
|
||||
board_runner_args(openocd "--cmd-post-verify=\"${POST_VERIFY}\"")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
board_runner_args(jlink "--device=MKW24D512xxx5")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
|
|
|
@ -3,5 +3,5 @@ set_ifndef(BOARD_DEBUG_RUNNER nios2)
|
|||
|
||||
board_finalize_runner_args(nios2
|
||||
# TODO: merge this script into nios2.py
|
||||
"--quartus-flash=$ENV{ZEPHYR_BASE}/scripts/support/quartus-flash.py"
|
||||
"--quartus-flash=${ZEPHYR_BASE}/scripts/support/quartus-flash.py"
|
||||
)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
board_runner_args(nios2 "--cpu-sof=$ENV{ZEPHYR_BASE}/arch/nios2/soc/nios2f-zephyr/cpu/ghrd_10m50da.sof")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/nios2.board.cmake)
|
||||
board_runner_args(nios2 "--cpu-sof=${ZEPHYR_BASE}/arch/nios2/soc/nios2f-zephyr/cpu/ghrd_10m50da.sof")
|
||||
include(${ZEPHYR_BASE}/boards/common/nios2.board.cmake)
|
||||
|
|
|
@ -8,5 +8,5 @@ board_runner_args(dfu-util "--pid=8087:0aba" "--alt=x86_app")
|
|||
set(PRE_LOAD targets 1)
|
||||
board_runner_args(openocd "--cmd-pre-load=\"${PRE_LOAD}\"")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
set(PRE_LOAD targets 1)
|
||||
board_runner_args(openocd "--cmd-pre-load=\"${PRE_LOAD}\"")
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -8,5 +8,5 @@ board_runner_args(dfu-util "--pid=8087:0aba" "--alt=x86_app")
|
|||
set(PRE_LOAD targets 1)
|
||||
board_runner_args(openocd "--cmd-pre-load=\"${PRE_LOAD}\"")
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
|
|
|
@ -1 +1 @@
|
|||
include($ENV{ZEPHYR_BASE}/boards/common/esp32.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
|
||||
|
|
|
@ -74,14 +74,17 @@ set(__build_dir ${CMAKE_CURRENT_BINARY_DIR}/zephyr)
|
|||
set(PROJECT_BINARY_DIR ${__build_dir})
|
||||
set(PROJECT_SOURCE_DIR $ENV{ZEPHYR_BASE})
|
||||
|
||||
# Convert path to use the '/' separator
|
||||
string(REPLACE "\\" "/" PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
||||
|
||||
set(ZEPHYR_BINARY_DIR ${PROJECT_BINARY_DIR})
|
||||
set(ZEPHYR_SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
||||
set(ZEPHYR_BASE ${PROJECT_SOURCE_DIR})
|
||||
|
||||
set(AUTOCONF_H ${__build_dir}/include/generated/autoconf.h)
|
||||
# Re-configure (Re-execute all CMakeLists.txt code) when autoconf.h changes
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${AUTOCONF_H})
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/cmake/extensions.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/extensions.cmake)
|
||||
|
||||
find_package(PythonInterp 3.4)
|
||||
|
||||
|
@ -101,7 +104,7 @@ endif()
|
|||
|
||||
add_custom_target(
|
||||
pristine
|
||||
COMMAND ${CMAKE_COMMAND} -P $ENV{ZEPHYR_BASE}/cmake/pristine.cmake
|
||||
COMMAND ${CMAKE_COMMAND} -P ${ZEPHYR_BASE}/cmake/pristine.cmake
|
||||
# Equivalent to rm -rf build/*
|
||||
)
|
||||
|
||||
|
@ -109,7 +112,7 @@ add_custom_target(
|
|||
if(MSYS)
|
||||
execute_process(
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE} $ENV{ZEPHYR_BASE}/scripts/check_host_is_ok.py
|
||||
${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/check_host_is_ok.py
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if(NOT "${ret}" STREQUAL "0")
|
||||
|
@ -185,7 +188,7 @@ set(CACHED_BOARD ${BOARD} CACHE STRING "Selected board")
|
|||
# Use BOARD to search zephyr/boards/** for a _defconfig file,
|
||||
# e.g. zephyr/boards/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig. When
|
||||
# found, use that path to infer the ARCH we are building for.
|
||||
find_path(BOARD_DIR NAMES "${BOARD}_defconfig" PATHS $ENV{ZEPHYR_BASE}/boards/*/* NO_DEFAULT_PATH)
|
||||
find_path(BOARD_DIR NAMES "${BOARD}_defconfig" PATHS ${ZEPHYR_BASE}/boards/*/* NO_DEFAULT_PATH)
|
||||
|
||||
assert_with_usage(BOARD_DIR "No board named '${BOARD}' found")
|
||||
|
||||
|
@ -219,17 +222,17 @@ Multiple files may be listed, e.g. CONF_FILE=\"prj1.conf prj2.conf\"")
|
|||
set(CMAKE_C_COMPILER_FORCED 1)
|
||||
set(CMAKE_CXX_COMPILER_FORCED 1)
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/cmake/version.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/cmake/host-tools.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/cmake/kconfig.cmake)
|
||||
include($ENV{ZEPHYR_BASE}/cmake/toolchain.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/version.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/host-tools.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/kconfig.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/toolchain.cmake)
|
||||
|
||||
# DTS should be run directly after kconfig because CONFIG_ variables
|
||||
# from kconfig and dts should be available at the same time. But
|
||||
# running DTS involves running the preprocessor, so we put it behind
|
||||
# toolchain. Meaning toolchain.cmake is the only component where
|
||||
# kconfig and dts variables aren't available at the same time.
|
||||
include($ENV{ZEPHYR_BASE}/dts/dts.cmake)
|
||||
include(${ZEPHYR_BASE}/dts/dts.cmake)
|
||||
|
||||
set(KERNEL_NAME ${CONFIG_KERNEL_BIN_NAME})
|
||||
|
||||
|
@ -247,13 +250,13 @@ include(${BOARD_DIR}/board.cmake OPTIONAL)
|
|||
|
||||
zephyr_library_named(app)
|
||||
|
||||
add_subdirectory($ENV{ZEPHYR_BASE} ${__build_dir})
|
||||
add_subdirectory(${ZEPHYR_BASE} ${__build_dir})
|
||||
|
||||
# Link 'app' with the Zephyr interface libraries.
|
||||
#
|
||||
# NB: This must be done in boilerplate.cmake because 'app' can only be
|
||||
# modified in the CMakeLists.txt file that created it. And it must be
|
||||
# done after 'add_subdirectory($ENV{ZEPHYR_BASE} ${__build_dir})'
|
||||
# done after 'add_subdirectory(${ZEPHYR_BASE} ${__build_dir})'
|
||||
# because interface libraries are defined while processing that
|
||||
# subdirectory.
|
||||
get_property(ZEPHYR_INTERFACE_LIBS_PROPERTY GLOBAL PROPERTY ZEPHYR_INTERFACE_LIBS)
|
||||
|
|
|
@ -142,7 +142,7 @@ if(QEMU_NET_STACK)
|
|||
# NET_TOOLS has been set to the net-tools repo path
|
||||
# net-tools/monitor_15_4 has been built beforehand
|
||||
|
||||
set_ifndef(NET_TOOLS $ENV{ZEPHYR_BASE}/../net-tools) # Default if not set
|
||||
set_ifndef(NET_TOOLS ${ZEPHYR_BASE}/../net-tools) # Default if not set
|
||||
|
||||
list(APPEND PRE_QEMU_COMMANDS_FOR_server
|
||||
COMMAND ${NET_TOOLS}/monitor_15_4
|
||||
|
@ -159,7 +159,7 @@ if(CONFIG_X86_IAMCU)
|
|||
list(APPEND PRE_QEMU_COMMANDS
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE}
|
||||
$ENV{ZEPHYR_BASE}/scripts/qemu-machine-hack.py
|
||||
${ZEPHYR_BASE}/scripts/qemu-machine-hack.py
|
||||
$<TARGET_FILE:${logical_target_for_zephyr_elf}>
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -318,7 +318,7 @@ function(generate_inc_file
|
|||
OUTPUT ${generated_file}
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE}
|
||||
$ENV{ZEPHYR_BASE}/scripts/file2hex.py
|
||||
${ZEPHYR_BASE}/scripts/file2hex.py
|
||||
${ARGN} # Extra arguments are passed to file2hex.py
|
||||
--file ${source_file}
|
||||
> ${generated_file} # Does pipe redirection work on Windows?
|
||||
|
@ -393,7 +393,7 @@ endmacro()
|
|||
# it to the argument "lib_name"
|
||||
macro(zephyr_library_get_current_dir_lib_name lib_name)
|
||||
# Remove the prefix (/home/sebo/zephyr/driver/serial/CMakeLists.txt => driver/serial/CMakeLists.txt)
|
||||
file(RELATIVE_PATH name $ENV{ZEPHYR_BASE} ${CMAKE_CURRENT_LIST_FILE})
|
||||
file(RELATIVE_PATH name ${ZEPHYR_BASE} ${CMAKE_CURRENT_LIST_FILE})
|
||||
|
||||
# Remove the filename (driver/serial/CMakeLists.txt => driver/serial)
|
||||
get_filename_component(name ${name} DIRECTORY)
|
||||
|
@ -976,7 +976,7 @@ macro(assert_with_usage test comment)
|
|||
message("see usage:")
|
||||
execute_process(
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -P $ENV{ZEPHYR_BASE}/cmake/usage/usage.cmake
|
||||
${CMAKE_COMMAND} -P ${ZEPHYR_BASE}/cmake/usage/usage.cmake
|
||||
)
|
||||
message(FATAL_ERROR "Invalid usage")
|
||||
endif()
|
||||
|
|
|
@ -48,7 +48,7 @@ foreach(target flash debug debugserver)
|
|||
set(cmd
|
||||
${CMAKE_COMMAND} -E env
|
||||
${PYTHON_EXECUTABLE}
|
||||
$ENV{ZEPHYR_BASE}/scripts/support/zephyr_flash_debug.py
|
||||
${ZEPHYR_BASE}/scripts/support/zephyr_flash_debug.py
|
||||
${RUNNER_VERBOSE}
|
||||
${runner}
|
||||
${target}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include($ENV{ZEPHYR_BASE}/cmake/host-tools-zephyr.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/host-tools-zephyr.cmake)
|
||||
|
||||
# Search for the must-have program dtc on PATH and in
|
||||
# TOOLCHAIN_HOME. Usually DTC will be provided by an SDK, but for
|
||||
|
|
|
@ -5,7 +5,7 @@ foreach(report ram_report rom_report)
|
|||
add_custom_target(
|
||||
${report}
|
||||
${PYTHON_EXECUTABLE}
|
||||
$ENV{ZEPHYR_BASE}/scripts/footprint/size_report
|
||||
${ZEPHYR_BASE}/scripts/footprint/size_report
|
||||
${flag_for_${report}}
|
||||
--objdump ${CMAKE_OBJDUMP}
|
||||
--nm ${CMAKE_NM}
|
||||
|
|
|
@ -50,7 +50,7 @@ foreach(file_name include include-fixed)
|
|||
list(APPEND NOSTDINC ${_OUTPUT})
|
||||
endforeach()
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/cmake/gcc-m-cpu.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/gcc-m-cpu.cmake)
|
||||
|
||||
if("${ARCH}" STREQUAL "arm")
|
||||
list(APPEND TOOLCHAIN_C_FLAGS
|
||||
|
@ -58,7 +58,7 @@ if("${ARCH}" STREQUAL "arm")
|
|||
-mcpu=${GCC_M_CPU}
|
||||
)
|
||||
|
||||
include($ENV{ZEPHYR_BASE}/cmake/fpu-for-gcc-m-cpu.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/fpu-for-gcc-m-cpu.cmake)
|
||||
|
||||
if(CONFIG_FLOAT)
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -mfpu=${FPU_FOR_${GCC_M_CPU}})
|
||||
|
|
|
@ -12,9 +12,9 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|||
if(ZEPHYR_GCC_VARIANT STREQUAL "host" OR CONFIG_ARCH_POSIX)
|
||||
set(COMPILER host-gcc)
|
||||
else()
|
||||
include($ENV{ZEPHYR_BASE}/cmake/toolchain-${ZEPHYR_GCC_VARIANT}.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/toolchain-${ZEPHYR_GCC_VARIANT}.cmake)
|
||||
endif()
|
||||
|
||||
# Configure the toolchain based on what toolchain technology is used
|
||||
# (gcc clang etc.)
|
||||
include($ENV{ZEPHYR_BASE}/cmake/toolchain-${COMPILER}.cmake OPTIONAL)
|
||||
include(${ZEPHYR_BASE}/cmake/toolchain-${COMPILER}.cmake OPTIONAL)
|
||||
|
|
|
@ -12,7 +12,7 @@ set(arch_list
|
|||
xtensa
|
||||
)
|
||||
|
||||
set(board_dir $ENV{ZEPHYR_BASE}/boards)
|
||||
set(board_dir ${ZEPHYR_BASE}/boards)
|
||||
|
||||
foreach(arch ${arch_list})
|
||||
set(board_arch_dir ${board_dir}/${arch})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
include($ENV{ZEPHYR_BASE}/cmake/hex.cmake)
|
||||
file(READ $ENV{ZEPHYR_BASE}/VERSION ver)
|
||||
include(${ZEPHYR_BASE}/cmake/hex.cmake)
|
||||
file(READ ${ZEPHYR_BASE}/VERSION ver)
|
||||
|
||||
string(REGEX MATCH "VERSION_MAJOR = ([0-9]*)" _ ${ver})
|
||||
set(PROJECT_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
zephyr_include_directories($ENV{ZEPHYR_BASE}/subsys/bluetooth)
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/subsys/bluetooth)
|
||||
add_subdirectory(hci)
|
||||
zephyr_sources_ifdef(CONFIG_BT_NRF51_PM nrf51_pm.c)
|
||||
|
|
|
@ -31,4 +31,4 @@ zephyr_sources_ifdef(CONFIG_SOC_FLASH_STM32
|
|||
)
|
||||
endif()
|
||||
|
||||
zephyr_include_directories_ifdef(CONFIG_SOC_FLASH_NRF5_RADIO_SYNC $ENV{ZEPHYR_BASE}/subsys/bluetooth)
|
||||
zephyr_include_directories_ifdef(CONFIG_SOC_FLASH_NRF5_RADIO_SYNC ${ZEPHYR_BASE}/subsys/bluetooth)
|
||||
|
|
|
@ -60,7 +60,7 @@ if(CONFIG_HAS_DTS)
|
|||
-I${PROJECT_SOURCE_DIR}/drivers
|
||||
-undef -D__DTS__
|
||||
-P
|
||||
-E $ENV{ZEPHYR_BASE}/misc/empty_file.c
|
||||
-E ${ZEPHYR_BASE}/misc/empty_file.c
|
||||
-o ${BOARD_FAMILY}.dts.pre.tmp
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
RESULT_VARIABLE ret
|
||||
|
|
|
@ -7,6 +7,6 @@ zephyr_library_sources_ifdef(CONFIG_DNS_RESOLVER resolve.c)
|
|||
|
||||
if(CONFIG_MDNS_RESPONDER)
|
||||
zephyr_library_sources(mdns_responder.c)
|
||||
zephyr_library_include_directories($ENV{ZEPHYR_BASE}/subsys/net/ip)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
zephyr_include_directories_ifdef(CONFIG_CONSOLE_SHELL
|
||||
$ENV{ZEPHYR_BASE}/include/drivers
|
||||
${ZEPHYR_BASE}/include/drivers
|
||||
)
|
||||
|
||||
zephyr_sources(
|
||||
|
|
|
@ -2,13 +2,13 @@ zephyr_library()
|
|||
|
||||
zephyr_library_include_directories(
|
||||
# USB headers
|
||||
$ENV{ZEPHYR_BASE}/include/drivers/usb
|
||||
$ENV{ZEPHYR_BASE}/include/usb/
|
||||
$ENV{ZEPHYR_BASE}/usb/include/
|
||||
${ZEPHYR_BASE}/include/drivers/usb
|
||||
${ZEPHYR_BASE}/include/usb/
|
||||
${ZEPHYR_BASE}/usb/include/
|
||||
..
|
||||
|
||||
# IP headers
|
||||
$ENV{ZEPHYR_BASE}/subsys/net/ip
|
||||
${ZEPHYR_BASE}/subsys/net/ip
|
||||
)
|
||||
|
||||
zephyr_library_sources(
|
||||
|
|
Loading…
Reference in a new issue