diff --git a/boards/atmega256rfr2-xpro/Makefile.include b/boards/atmega256rfr2-xpro/Makefile.include index ae118a9a52..3f55b658d4 100644 --- a/boards/atmega256rfr2-xpro/Makefile.include +++ b/boards/atmega256rfr2-xpro/Makefile.include @@ -9,6 +9,8 @@ PROGRAMMER ?= xplainedpro # This board can be reset via avrdude RESET ?= avrdude -c $(PROGRAMMER) -p m256rfr2 +# Use edbg interface for debugging +DEBUGSERVER_INTERFACE ?= --edbg include $(RIOTMAKE)/tools/avrdude.inc.mk include $(RIOTBOARD)/common/atmega/Makefile.include diff --git a/boards/atmega256rfr2-xpro/dist/debug.sh b/boards/atmega256rfr2-xpro/dist/debug.sh new file mode 100755 index 0000000000..d1fb3d67ea --- /dev/null +++ b/boards/atmega256rfr2-xpro/dist/debug.sh @@ -0,0 +1,11 @@ +#!/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 diff --git a/boards/atmega256rfr2-xpro/dist/debug_srv.sh b/boards/atmega256rfr2-xpro/dist/debug_srv.sh new file mode 100755 index 0000000000..8e7de053ab --- /dev/null +++ b/boards/atmega256rfr2-xpro/dist/debug_srv.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +sleep 2 +avarice $1 + +# avarice exits with 1 if the connection is released, therefore we always exit with 0 +exit 0 diff --git a/boards/atmega256rfr2-xpro/dist/gdb.conf b/boards/atmega256rfr2-xpro/dist/gdb.conf new file mode 100644 index 0000000000..ca68eb344c --- /dev/null +++ b/boards/atmega256rfr2-xpro/dist/gdb.conf @@ -0,0 +1 @@ +set $pc=0x00