boards/atmega256rfr2-xpro: configure debug

This commit is contained in:
Alexandre Abadie 2019-11-04 21:21:42 +01:00
parent 1a16ee8215
commit f24a3802c7
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
4 changed files with 21 additions and 0 deletions

View File

@ -9,6 +9,8 @@ PROGRAMMER ?= xplainedpro
# This board can be reset via avrdude # This board can be reset via avrdude
RESET ?= avrdude -c $(PROGRAMMER) -p m256rfr2 RESET ?= avrdude -c $(PROGRAMMER) -p m256rfr2
# Use edbg interface for debugging
DEBUGSERVER_INTERFACE ?= --edbg
include $(RIOTMAKE)/tools/avrdude.inc.mk include $(RIOTMAKE)/tools/avrdude.inc.mk
include $(RIOTBOARD)/common/atmega/Makefile.include include $(RIOTBOARD)/common/atmega/Makefile.include

11
boards/atmega256rfr2-xpro/dist/debug.sh vendored Executable file
View File

@ -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

7
boards/atmega256rfr2-xpro/dist/debug_srv.sh vendored Executable file
View File

@ -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

View File

@ -0,0 +1 @@
set $pc=0x00