Skip to content

Commit

Permalink
Merge #19723
Browse files Browse the repository at this point in the history
19723: dist/tools/openocd: add RTT port variable r=maribu a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
  • Loading branch information
bors[bot] and fabian18 authored Jun 12, 2023
2 parents 63f537f + dbfb0ea commit 0fdea67
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dist/tools/openocd/openocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
#
# term-rtt: opens a serial terminal using RTT (Real-Time Transfer)
#
# <options>
# RTT_PORT: port opened for RTT connection
#
# @author Hauke Peteresen <hauke.petersen@fu-berlin.de>
# @author Joakim Nohlgård <joakim.nohlgard@eistec.se>

Expand All @@ -84,6 +87,8 @@
: ${TELNET_PORT:=4444}
# Default TCL port, set to 0 to disable
: ${TCL_PORT:=6333}
# Default RTT port
: ${RTT_PORT:=9999}
# Default OpenOCD command
: ${OPENOCD:=openocd}
# Extra board initialization commands to pass to OpenOCD
Expand Down Expand Up @@ -132,7 +137,7 @@

# default terminal frontend
_OPENOCD_TERMPROG=${RIOTTOOLS}/pyterm/pyterm
_OPENOCD_TERMFLAGS="-ts 9999 ${PYTERMFLAGS}"
_OPENOCD_TERMFLAGS="-ts ${RTT_PORT} ${PYTERMFLAGS}"

#
# Examples of alternative debugger configurations
Expand Down Expand Up @@ -449,7 +454,7 @@ do_term() {
-c init \
-c 'rtt setup '${RAM_START_ADDR}' '${RAM_LEN}' \"SEGGER RTT\"' \
-c 'rtt start' \
-c 'rtt server start 9999 0' \
-c 'rtt server start '${RTT_PORT}' 0' \
>/dev/null & \
echo \$! > $OPENOCD_PIDFILE" &
sleep 1
Expand Down

0 comments on commit 0fdea67

Please sign in to comment.