Merge pull request #2305 from x3ro/samr21-autostart-gdb
Samr21: autostart gdb when running make debug
This commit is contained in:
commit
36cb57bb33
@ -29,6 +29,7 @@ export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endi
|
|||||||
export LINKFLAGS += -T$(LINKERSCRIPT)
|
export LINKFLAGS += -T$(LINKERSCRIPT)
|
||||||
export OFLAGS += -O binary
|
export OFLAGS += -O binary
|
||||||
export FFLAGS += $(HEXFILE)
|
export FFLAGS += $(HEXFILE)
|
||||||
|
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)
|
||||||
export TERMFLAGS += "$(PORT)"
|
export TERMFLAGS += "$(PORT)"
|
||||||
|
|
||||||
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
|
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
|
||||||
|
|||||||
13
boards/samr21-xpro/dist/debug.sh
vendored
13
boards/samr21-xpro/dist/debug.sh
vendored
@ -5,4 +5,15 @@ openocd -f "board/atmel_samr21_xplained_pro.cfg" \
|
|||||||
-c "telnet_port 4444" \
|
-c "telnet_port 4444" \
|
||||||
-c "init" \
|
-c "init" \
|
||||||
-c "targets" \
|
-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
2
boards/samr21-xpro/dist/gdb.conf
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
target remote localhost:3333
|
||||||
|
monitor reset halt
|
||||||
Loading…
x
Reference in New Issue
Block a user