Skip to content

Commit e7fdc84

Browse files
jerome-pouillerdkalowsk
authored andcommitted
cmake: Fix support for "ninja flash"
By default west looks at the parents directory to find Zephyr base directory. However, in the case the build directory is not a subdirectory of zephyr base and the user run "ninja flash" directly from the build directory, west fails to detect Zephyr base. So, this patch explicitly add ZEPHYR_BASE in the environment. Implementation notes: * ZEPHYR_BASE is already set for ninja menuconfig in cmake/modules/kconfig.cmake:201 * ZEPHYR_BASE seems better than --zephyr-base since the environment in inherited * BTW, --zephyr-base seems to not have any impact and seems broken Signed-off-by: Jérôme Pouiller <[email protected]>
1 parent e6f179d commit e7fdc84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/flash/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ foreach(target flash debug debugserver attach rtt)
196196
-DDEPENDENCIES="$<TARGET_PROPERTY:${target},MANUALLY_ADDED_DEPENDENCIES>"
197197
-P ${CMAKE_CURRENT_LIST_DIR}/check_runner_dependencies.cmake
198198
COMMAND
199-
${CMAKE_COMMAND} -E env
199+
${CMAKE_COMMAND} -E env ZEPHYR_BASE=${ZEPHYR_BASE}
200200
${WEST}
201201
${RUNNER_VERBOSE}
202202
${target}

0 commit comments

Comments
 (0)