1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

dist/jlink: textual improvements

- renamed JLink -> J-Link [1]
- fixed incomplete sentence
- fixed typo's

[1] https://wiki.segger.com/J-Link_Commander
This commit is contained in:
Bas Stottelaar 2020-10-21 14:08:52 +02:00
parent 107fd41b1a
commit 8af4f4a60c

View File

@ -1,21 +1,22 @@
#!/bin/sh #!/bin/sh
# #
# Unified Segger JLink script for RIOT # Unified Segger J-Link script for RIOT
# #
# This script is supposed to be called from RIOTs make system, # This script is supposed to be called from RIOTs build system,
# as it depends on certain environment variables. An # as it depends on certain environment variables.
# #
# Global environment variables used: # Global environment variables used:
# JLINK: JLink command name, default: "JLinkExe" # JLINK: J-Link Commander command name, default: "JLinkExe"
# JLINK_SERVER: JLink GCB server command name, default: "JLinkGDBDerver" # JLINK_SERVER: J-Link GDB Server command name, default: "JLinkGDBServer"
# JLINK_DEVICE: Device identifier used by JLink # JLINK_DEVICE: Device identifier used by J-Link
# JLINK_SERIAL: Device serial used by JLink # JLINK_SERIAL: Device serial used by J-Link
# JLINK_IF: Interface used by JLink, default: "SWD" # JLINK_IF: Interface used by J-Link, default: "SWD"
# JLINK_SPEED: Interface clock speed to use (in kHz), default "2000" # JLINK_SPEED: Interface clock speed to use (in kHz), default "2000"
# FLASH_ADDR: Starting address of the target's flash memory, default: "0" # FLASH_ADDR: Starting address of the target's flash memory, default: "0"
# IMAGE_OFFSET: Offset from the targets flash memory, for flashing the image # IMAGE_OFFSET: Offset from the targets flash memory, for flashing the
# JLINK_PRE_FLASH: Additional JLink commands to execute before flashing # image
# JLINK_POST_FLASH: Additional JLink commands to execute after flashing # JLINK_PRE_FLASH: Additional J-Link commands to execute before flashing
# JLINK_POST_FLASH: Additional J-Link commands to execute after flashing
# #
# The script supports the following actions: # The script supports the following actions:
# #
@ -28,7 +29,7 @@
# #
# debug: debug <elffile> # debug: debug <elffile>
# #
# starts JLink as GDB server in the background and # starts J-Link as GDB server in the background and
# connects to the server with the GDB client specified by # connects to the server with the GDB client specified by
# the board (DBG environment variable) # the board (DBG environment variable)
# #
@ -39,7 +40,7 @@
# DBG: debugger client command, default: 'gdb -q' # DBG: debugger client command, default: 'gdb -q'
# TUI: if TUI!=null, the -tui option will be used # TUI: if TUI!=null, the -tui option will be used
# #
# debug-server: starts JLink as GDB server, but does not connect to # debug-server: starts J-Link as GDB server, but does not connect to
# to it with any frontend. This might be useful when using # to it with any frontend. This might be useful when using
# IDEs. # IDEs.
# #
@ -50,7 +51,7 @@
# reset: triggers a hardware reset of the target board # reset: triggers a hardware reset of the target board
# #
# #
# term-rtt: opens a serial terminal using jlink RTT(reak time transfer) # term-rtt: opens a serial terminal using J-Link RTT (Real-Time Transfer)
# #
# #
# @author Hauke Peteresen <hauke.petersen@fu-berlin.de> # @author Hauke Peteresen <hauke.petersen@fu-berlin.de>
@ -64,7 +65,7 @@
_GDB_PORT=3333 _GDB_PORT=3333
# default telnet port # default telnet port
_TELNET_PORT=4444 _TELNET_PORT=4444
# default JLink command, interface and speed # default J-Link command names, interface and speed
_JLINK=JLinkExe _JLINK=JLinkExe
_JLINK_SERVER=JLinkGDBServer _JLINK_SERVER=JLinkGDBServer
_JLINK_IF=SWD _JLINK_IF=SWD
@ -191,7 +192,7 @@ do_debug() {
test_ports test_ports
test_tui test_tui
test_dbg test_dbg
# start the JLink GDB server # start the J-Link GDB server
sh -c "${JLINK_SERVER} ${JLINK_SERIAL_SERVER} \ sh -c "${JLINK_SERVER} ${JLINK_SERIAL_SERVER} \
-device '${JLINK_DEVICE}' \ -device '${JLINK_DEVICE}' \
-speed '${JLINK_SPEED}' \ -speed '${JLINK_SPEED}' \
@ -210,7 +211,7 @@ do_debugserver() {
test_ports test_ports
test_config test_config
test_serial test_serial
# start the JLink GDB server # start the J-Link GDB server
sh -c "${JLINK_SERVER} ${JLINK_SERIAL_SERVER} \ sh -c "${JLINK_SERVER} ${JLINK_SERIAL_SERVER} \
-device '${JLINK_DEVICE}' \ -device '${JLINK_DEVICE}' \
-speed '${JLINK_SPEED}' \ -speed '${JLINK_SPEED}' \
@ -237,7 +238,7 @@ do_term() {
test_serial test_serial
test_term test_term
# temporary file that save the JLink pid # temporary file that save the J-Link Commander pid
JLINK_PIDFILE=$(mktemp -t "jilnk_pid.XXXXXXXXXX") JLINK_PIDFILE=$(mktemp -t "jilnk_pid.XXXXXXXXXX")
# will be called by trap # will be called by trap
cleanup() { cleanup() {
@ -251,7 +252,7 @@ do_term() {
# cleanup after script terminates # cleanup after script terminates
trap "cleanup ${JLINK_PIDFILE}" EXIT INT trap "cleanup ${JLINK_PIDFILE}" EXIT INT
# start Jlink as RTT server # start J-link as RTT server
sh -c "${JLINK} ${JLINK_SERIAL} \ sh -c "${JLINK} ${JLINK_SERIAL} \
-exitonerror 1 \ -exitonerror 1 \
-device '${JLINK_DEVICE}' \ -device '${JLINK_DEVICE}' \