RIOT/dist/tools/avarice/debug.sh
Marian Buschsieweke edd93411fe
dist: De-duplicated AVR debug config & scripts
Use common debug.sh, debug_srv.sh and gdb.conf for all AVR boards.
2020-03-10 12:54:51 +01:00

12 lines
299 B
Bash
Executable File

#!/usr/bin/env bash
# The setsid command is needed so that Ctrl+C in GDB doesn't kill avarice
: ${SETSID:=setsid}
sleep 2
${SETSID} -w avarice $1 &
sleep 3 && avr-gdb -ex "target remote localhost:$3" $4
# avarice exits with 1 if the connection is released, therefore we always exit with 0
exit 0