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

Merge pull request #7904 from basilfx/bugfix/jlink

dist/tools: check DBG env var.
This commit is contained in:
Kaspar Schleiser 2017-11-01 17:39:22 +01:00 committed by GitHub
commit 9b32d18e92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@
# options: # options:
# BINFILE: path to the binary file that is flashed # BINFILE: path to the binary file that is flashed
# #
# debug: starts OpenOCD as GDB server in the background and # debug: starts JLink 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)
# #
@ -35,7 +35,7 @@
# TUI: if TUI!=null, the -tui option will be used # TUI: if TUI!=null, the -tui option will be used
# ELFFILE: path to the ELF file to debug # ELFFILE: path to the ELF file to debug
# #
# debug-server: starts OpenOCD as GDB server, but does not connect to # debug-server: starts JLink 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.
# #
@ -128,6 +128,13 @@ test_serial() {
fi fi
} }
test_dbg() {
if [ -z "${DBG}" ]; then
echo "Error: No debugger defined in DBG env var"
exit 1
fi
}
# #
# now comes the actual actions # now comes the actual actions
# #
@ -161,6 +168,7 @@ do_debug() {
test_elffile test_elffile
test_ports test_ports
test_tui test_tui
test_dbg
# start the JLink GDB server # start the JLink GDB server
sh -c "${JLINK_SERVER} ${JLINK_SERIAL_SERVER} \ sh -c "${JLINK_SERVER} ${JLINK_SERIAL_SERVER} \
-device '${JLINK_DEVICE}' \ -device '${JLINK_DEVICE}' \