Skip to content

Commit 838f8a1

Browse files
committed
feat(Makefile.posix): Impl {startdebug,debug-gdbinit}.stlinkv2
1 parent 24a1cd2 commit 838f8a1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

make/Makefile.posix

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,26 @@ from-scratch: all flash.jlink flash-softdevice
169169
$(MAKE_BUILD_FOLDER)
170170
$(JLINK) $(OUTPUT_PATH)flash.jlink
171171

172-
startdebug: debug-gdbinit
172+
startdebug: startdebug.jlink
173+
174+
startdebug.jlink: debug-gdbinit.jlink
173175
$(TERMINAL) "$(JLINKGDBSERVER) -port $(GDB_PORT_NUMBER)"
174176
sleep 1
175177
$(TERMINAL) "$(GDB) $(ELF)"
176178

179+
startdebug.stlinkv2: debug-gdbinit.stlinkv2
180+
$(GDB) $(ELF)
181+
177182
startrtt:
178183
$(TERMINAL) "JLinkExe -device nrf51822 -if swd -speed 1000 -AutoConnect 1"
179184
sleep 1
180185
$(TERMINAL) "$(JLINKRTTCLIENT)"
181186

182-
debug-gdbinit:
187+
debug-gdbinit.jlink:
183188
printf "target remote localhost:$(GDB_PORT_NUMBER)\nload\nmon reset\nbreak main\n" > .gdbinit
184189

190+
debug-gdbinit.stlinkv2:
191+
printf "target remote | $(OPENOCD) -c 'gdb_port pipe; log_output openocd.log'" > .gdbinit
192+
193+
185194
.PHONY: flash flash-softdevice erase-all startdebug test-softdevice flash.jlink

0 commit comments

Comments
 (0)