File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -99,19 +99,16 @@ endif
99
99
JLINK_IF ?= swd
100
100
101
101
# Jlink script
102
- define jlink_script
103
- halt
104
- loadfile $^
105
- r
106
- go
107
- exit
108
- endef
109
- export jlink_script
102
+ $(BUILD ) /$(BOARD ) .jlink : $(BUILD ) /$(PROJECT ) .hex
103
+ @echo halt > $@
104
+ @echo loadfile $^ >> $@
105
+ @echo r >> $@
106
+ @echo go >> $@
107
+ @echo exit >> $@
110
108
111
109
# Flash using jlink
112
- flash-jlink : $(BUILD ) /$(PROJECT ) .hex
113
- @echo " $$ jlink_script" > $(BUILD ) /$(BOARD ) .jlink
114
- $(JLINKEXE ) -device $(JLINK_DEVICE ) -if $(JLINK_IF ) -JTAGConf -1,-1 -speed auto -CommandFile $(BUILD ) /$(BOARD ) .jlink
110
+ flash-jlink : $(BUILD ) /$(BOARD ) .jlink
111
+ $(JLINKEXE ) -device $(JLINK_DEVICE ) -if $(JLINK_IF ) -JTAGConf -1,-1 -speed auto -CommandFile $<
115
112
116
113
# Flash STM32 MCU using stlink with STM32 Cube Programmer CLI
117
114
flash-stlink : $(BUILD ) /$(PROJECT ) .elf
You can’t perform that action at this time.
0 commit comments