Skip to content
Commit eb95bed5 authored by Martí Bolívar's avatar Martí Bolívar Committed by Johan Hedberg
Browse files

scripts: west_commands: fix argument handling with runners.yaml



Refactor the code to support the new runners.yaml file created by the
build system.

Compared to fishing around in the CMake cache, this makes it trivial
to put all the command line arguments to a runner-based command on
equal footing, regardless of if they're defined in the runners package
proper or defined in run_common.py.

This allows board.cmake files to do things like this:

   board_set_runner_args(foo
     --bin-file=${PROJECT_BINARY_DIR}/my-signed.bin)

While at it, make some other cleanups:

- Stop using the obsolete and deprecated west.cmake module while we're
  here in favor of the zcmake.py module which was added to Zephyr a long
  time ago. Yikes. I had forgotten this was still here.

- Stop using west.util's wrap function in favor of raw use of
  textwrap. The west function splits on hyphens, which is breaking
  runner names like "em-starterkit".

- Clean up the --context output a bit

Fixes: #22563
Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent 5ba47f07
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment