Browse Source

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>
pull/81714/head
Chris Friedt 8 months ago committed by Fabio Baltieri
parent
commit
d6f32bb339
  1. 4
      cmake/flash/CMakeLists.txt
  2. 2
      scripts/west_commands/debug.py

4
cmake/flash/CMakeLists.txt

@ -154,7 +154,7 @@ endif()
# Generate the flash, debug, debugserver, attach targets within the build # Generate the flash, debug, debugserver, attach targets within the build
# system itself. # system itself.
foreach(target flash debug debugserver attach) foreach(target flash debug debugserver attach rtt)
if(target STREQUAL flash) if(target STREQUAL flash)
set(comment "Flashing ${BOARD}") set(comment "Flashing ${BOARD}")
elseif(target STREQUAL debug) elseif(target STREQUAL debug)
@ -168,6 +168,8 @@ foreach(target flash debug debugserver attach)
endif() endif()
elseif(target STREQUAL attach) elseif(target STREQUAL attach)
set(comment "Debugging ${BOARD}") set(comment "Debugging ${BOARD}")
elseif(target STREQUAL rtt)
set(comment "RTT ${BOARD}")
endif() endif()
string(TOUPPER ${target} TARGET_UPPER) string(TOUPPER ${target} TARGET_UPPER)

2
scripts/west_commands/debug.py

@ -85,7 +85,7 @@ class Rtt(WestCommand):
'open an rtt shell', 'open an rtt shell',
"", "",
accepts_unknown_args=True) 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): def do_add_parser(self, parser_adder):
return add_parser_common(self, parser_adder) return add_parser_common(self, parser_adder)

Loading…
Cancel
Save