Commit d1135e4 1 parent efcd8dc commit d1135e4 Copy full SHA for d1135e4
File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,17 @@ include rules.mk
49
49
size : $(OBJS ) $(ELF )
50
50
@$(PREFIX ) -size $(ELF )
51
51
52
- debug : $(ELF )
52
+ BMP = $(shell ls -1 /dev/cu.usbmodem* | head -1)
53
+ BMP_ARGS = -ex "target extended-remote $(BMP ) " -ex "mon swdp_scan" -ex "attach 1"
54
+ GDB = arm-none-eabi-gdb
55
+
56
+ flash : $(ELF )
57
+ $(GDB ) $(BMP_ARGS ) -ex " load" -ex " quit" $(ELF )
58
+
59
+ gdb : $(ELF )
60
+ $(GDB ) $(BMP_ARGS ) $(ELF )
61
+
62
+ ocd-gdb : $(ELF )
53
63
-$(GDB ) --eval " target remote | $( OOCD) -f $( OOCD_INTERFACE) -f $( OOCD_BOARD) -f debug.cfg" $(ELF )
54
64
55
65
erase :
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ srec: $(BINARY).srec
143
143
list : $(BINARY ) .list
144
144
145
145
images : $(BUILD ) /$(BINARY ) .images
146
- flash : $(BUILD ) /$(BINARY ) .flash
146
+ ocd- flash : $(BUILD ) /$(BINARY ) .flash
147
147
148
148
$(LDSCRIPT ) :
149
149
ifeq (,$(wildcard $(LDSCRIPT)))
You can’t perform that action at this time.
0 commit comments