scripts: make runner a west subpackage

This is a stepping-stone to adding runner functionality into west
itself.

Since all of the runner tools assume a Zephyr build directory layout,
this doesn't put anything generic into a Zephyr-specific tool.

Make minimal adjustments to zephyr_flash_debug.py to keep existing
build system targets working unmodified.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This commit is contained in:
Marti Bolivar 2018-05-09 13:24:57 -04:00 committed by Anas Nashif
parent 641ae471a7
commit 9e7d16acd9
17 changed files with 8 additions and 7 deletions

View File

@ -531,9 +531,10 @@ endmacro()
# This section is for extensions which control Zephyr's board runners
# from the build system. The Zephyr build system has targets for
# flashing and debugging supported boards. These are wrappers around a
# "runner" Python package that is part of Zephyr. This section
# provides glue between CMake and the runner invocation script,
# zephyr_flash_debug.py.
# "runner" Python subpackage that is part of Zephyr's "west" tool.
#
# This section provides glue between CMake and the Python code that
# manages the runners.
# This function is intended for board.cmake files and application
# CMakeLists.txt files.
@ -541,8 +542,8 @@ endmacro()
# Usage from board.cmake files:
# board_runner_args(runner "--some-arg=val1" "--another-arg=val2")
#
# The build system will then ensure the command line to
# zephyr_flash_debug.py contains:
# The build system will then ensure the command line used to
# create the runner contains:
# --some-arg=val1 --another-arg=val2
#
# Within application CMakeLists.txt files, ensure that all calls to

View File

@ -79,7 +79,7 @@ foreach(target flash debug debugserver)
set(cmd
${CMAKE_COMMAND} -E env
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/support/zephyr_flash_debug.py
${ZEPHYR_BASE}/scripts/meta/zephyr_flash_debug.py
${RUNNER_VERBOSE}
${runner}
${target}

View File

@ -19,7 +19,7 @@ import functools
import sys
import os
from runner.core import ZephyrBinaryRunner
from west.runner.core import ZephyrBinaryRunner
def print_runners_handler(args):