From 838f8a13addbd3ea6a951083ff537fc993b5d188 Mon Sep 17 00:00:00 2001 From: Dmitriy Volkov Date: Fri, 10 Feb 2017 15:54:56 +0300 Subject: [PATCH] feat(Makefile.posix): Impl {startdebug,debug-gdbinit}.stlinkv2 --- make/Makefile.posix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/make/Makefile.posix b/make/Makefile.posix index 14acb274..14c16d2f 100644 --- a/make/Makefile.posix +++ b/make/Makefile.posix @@ -169,17 +169,26 @@ from-scratch: all flash.jlink flash-softdevice $(MAKE_BUILD_FOLDER) $(JLINK) $(OUTPUT_PATH)flash.jlink -startdebug: debug-gdbinit +startdebug: startdebug.jlink + +startdebug.jlink: debug-gdbinit.jlink $(TERMINAL) "$(JLINKGDBSERVER) -port $(GDB_PORT_NUMBER)" sleep 1 $(TERMINAL) "$(GDB) $(ELF)" +startdebug.stlinkv2: debug-gdbinit.stlinkv2 + $(GDB) $(ELF) + startrtt: $(TERMINAL) "JLinkExe -device nrf51822 -if swd -speed 1000 -AutoConnect 1" sleep 1 $(TERMINAL) "$(JLINKRTTCLIENT)" -debug-gdbinit: +debug-gdbinit.jlink: printf "target remote localhost:$(GDB_PORT_NUMBER)\nload\nmon reset\nbreak main\n" > .gdbinit +debug-gdbinit.stlinkv2: + printf "target remote | $(OPENOCD) -c 'gdb_port pipe; log_output openocd.log'" > .gdbinit + + .PHONY: flash flash-softdevice erase-all startdebug test-softdevice flash.jlink