From d6f32bb3393c63febf76b233e76255b1bb6cf8b7 Mon Sep 17 00:00:00 2001 From: Chris Friedt Date: Sat, 9 Nov 2024 09:06:54 -0500 Subject: [PATCH] cmake: flash: update cmake to support rtt target Add support for the rtt target so that users can run `west build -p auto -b -t rtt ` similarly to the way that users can now do so with the debug target, since the rtt target is supposed to be used in a similar way. Signed-off-by: Chris Friedt --- cmake/flash/CMakeLists.txt | 4 +++- scripts/west_commands/debug.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/flash/CMakeLists.txt b/cmake/flash/CMakeLists.txt index 8fe7380695b..d1f0d17da6e 100644 --- a/cmake/flash/CMakeLists.txt +++ b/cmake/flash/CMakeLists.txt @@ -154,7 +154,7 @@ endif() # Generate the flash, debug, debugserver, attach targets within the build # system itself. -foreach(target flash debug debugserver attach) +foreach(target flash debug debugserver attach rtt) if(target STREQUAL flash) set(comment "Flashing ${BOARD}") elseif(target STREQUAL debug) @@ -168,6 +168,8 @@ foreach(target flash debug debugserver attach) endif() elseif(target STREQUAL attach) set(comment "Debugging ${BOARD}") + elseif(target STREQUAL rtt) + set(comment "RTT ${BOARD}") endif() string(TOUPPER ${target} TARGET_UPPER) diff --git a/scripts/west_commands/debug.py b/scripts/west_commands/debug.py index 156222aa332..e3bf9b40275 100644 --- a/scripts/west_commands/debug.py +++ b/scripts/west_commands/debug.py @@ -85,7 +85,7 @@ class Rtt(WestCommand): 'open an rtt shell', "", accepts_unknown_args=True) - self.runner_key = 'rtt-runner' # in runners.yaml + self.runner_key = 'debug-runner' # in runners.yaml def do_add_parser(self, parser_adder): return add_parser_common(self, parser_adder)