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

Merge pull request #2305 from x3ro/samr21-autostart-gdb

Samr21: autostart gdb when running make debug
This commit is contained in:
Thomas Eichinger 2015-01-27 21:07:55 +01:00
commit 36cb57bb33
3 changed files with 15 additions and 1 deletions

View File

@ -29,6 +29,7 @@ export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endi
export LINKFLAGS += -T$(LINKERSCRIPT)
export OFLAGS += -O binary
export FFLAGS += $(HEXFILE)
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)
export TERMFLAGS += "$(PORT)"
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++

View File

@ -5,4 +5,15 @@ openocd -f "board/atmel_samr21_xplained_pro.cfg" \
-c "telnet_port 4444" \
-c "init" \
-c "targets" \
-c "reset halt"
-c "reset halt" \
-l /dev/null &
# save pid to terminate afterwards
OCD_PID=$?
# needed for openocd to set up
sleep 5
arm-none-eabi-gdb -tui --command=${1} ${2}
kill ${OCD_PID}

2
boards/samr21-xpro/dist/gdb.conf vendored Normal file
View File

@ -0,0 +1,2 @@
target remote localhost:3333
monitor reset halt