diff --git a/boards/common/arduino-atmega/dist/debug.sh b/boards/common/arduino-atmega/dist/debug.sh deleted file mode 100644 index 46dc7377ca..0000000000 --- a/boards/common/arduino-atmega/dist/debug.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 2 && $2/avr-gdb-wrapper -ex "target remote localhost:$3" $4 -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/common/arduino-atmega/dist/debug_srv.sh b/boards/common/arduino-atmega/dist/debug_srv.sh deleted file mode 100644 index 8e7de053ab..0000000000 --- a/boards/common/arduino-atmega/dist/debug_srv.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/common/arduino-atmega/dist/gdb.conf b/boards/common/arduino-atmega/dist/gdb.conf deleted file mode 100644 index ca68eb344c..0000000000 --- a/boards/common/arduino-atmega/dist/gdb.conf +++ /dev/null @@ -1 +0,0 @@ -set $pc=0x00 diff --git a/boards/mega-xplained/dist/debug.sh b/boards/mega-xplained/dist/debug.sh deleted file mode 100755 index 46dc7377ca..0000000000 --- a/boards/mega-xplained/dist/debug.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 2 && $2/avr-gdb-wrapper -ex "target remote localhost:$3" $4 -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/mega-xplained/dist/debug_srv.sh b/boards/mega-xplained/dist/debug_srv.sh deleted file mode 100755 index 8e7de053ab..0000000000 --- a/boards/mega-xplained/dist/debug_srv.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/mega-xplained/dist/gdb.conf b/boards/mega-xplained/dist/gdb.conf deleted file mode 100644 index ca68eb344c..0000000000 --- a/boards/mega-xplained/dist/gdb.conf +++ /dev/null @@ -1 +0,0 @@ -set $pc=0x00 diff --git a/boards/waspmote-pro/dist/debug.sh b/boards/waspmote-pro/dist/debug.sh deleted file mode 100755 index 46dc7377ca..0000000000 --- a/boards/waspmote-pro/dist/debug.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 2 && $2/avr-gdb-wrapper -ex "target remote localhost:$3" $4 -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/waspmote-pro/dist/debug_srv.sh b/boards/waspmote-pro/dist/debug_srv.sh deleted file mode 100755 index 8e7de053ab..0000000000 --- a/boards/waspmote-pro/dist/debug_srv.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/waspmote-pro/dist/gdb.conf b/boards/waspmote-pro/dist/gdb.conf deleted file mode 100644 index ca68eb344c..0000000000 --- a/boards/waspmote-pro/dist/gdb.conf +++ /dev/null @@ -1 +0,0 @@ -set $pc=0x00 diff --git a/boards/atmega256rfr2-xpro/dist/debug.sh b/dist/tools/avarice/debug.sh similarity index 100% rename from boards/atmega256rfr2-xpro/dist/debug.sh rename to dist/tools/avarice/debug.sh diff --git a/boards/atmega256rfr2-xpro/dist/debug_srv.sh b/dist/tools/avarice/debug_srv.sh similarity index 100% rename from boards/atmega256rfr2-xpro/dist/debug_srv.sh rename to dist/tools/avarice/debug_srv.sh diff --git a/boards/atmega256rfr2-xpro/dist/gdb.conf b/dist/tools/avarice/gdb.conf similarity index 100% rename from boards/atmega256rfr2-xpro/dist/gdb.conf rename to dist/tools/avarice/gdb.conf diff --git a/makefiles/tools/avrdude.inc.mk b/makefiles/tools/avrdude.inc.mk index c5a317b892..97c283a27b 100644 --- a/makefiles/tools/avrdude.inc.mk +++ b/makefiles/tools/avrdude.inc.mk @@ -1,11 +1,12 @@ FLASHER = avrdude DIST_PATH = $(BOARDSDIR)/$(BOARD)/dist +AVARICE_PATH = $(RIOTTOOLS)/avarice DEBUGSERVER_PORT = 4242 -DEBUGSERVER = $(DIST_PATH)/debug_srv.sh +DEBUGSERVER = $(AVARICE_PATH)/debug_srv.sh DEBUGSERVER_INTERFACE ?= DEBUGSERVER_FLAGS = "-g -j usb $(DEBUGSERVER_INTERFACE) :$(DEBUGSERVER_PORT)" -DEBUGGER_FLAGS = "-x $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)" -DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBUGSERVER_PORT) +DEBUGGER_FLAGS = "-x $(AVARICE_PATH)/gdb.conf $(ELFFILE)" +DEBUGGER = "$(AVARICE_PATH)/debug.sh" $(DEBUGSERVER_FLAGS) $(AVARICE_PATH) $(DEBUGSERVER_PORT) PROGRAMMER_FLAGS = -p $(subst atmega,m,$(CPU))