cmake: flash: update cmake to support rtt target

Add support for the rtt target so that users can run

`west build -p auto -b <board> -t rtt <app>`

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 <cfriedt@tenstorrent.com>
This commit is contained in:
Chris Friedt 2024-11-09 09:06:54 -05:00 committed by Fabio Baltieri
commit d6f32bb339
2 changed files with 4 additions and 2 deletions

View file

@ -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)

View file

@ -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)