File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ ifdef ID
6565endif
6666 printf "loadfile $(HEX) \nr\ng\nexit\n" >> $(OUTPUT_PATH)flash.jlink
6767
68+ flash.stlinkv2:
69+ $(MAKE_BUILD_FOLDER)
70+ $(OPENOCD) -c 'program $(HEX) verify reset exit'
6871
6972test-softdevice: test-softdevice.jlink
7073ifndef SOFTDEVICE
@@ -141,6 +144,10 @@ reset.jlink:
141144 $(MAKE_BUILD_FOLDER)
142145 printf "r\ng\nexit\n" > $(OUTPUT_PATH)reset.jlink
143146
147+ reset.stlinkv2:
148+ $(MAKE_BUILD_FOLDER)
149+ $(OPENOCD) -c init -c 'reset run' -c shutdown
150+
144151erase-all: erase-all.jlink
145152 $(MAKE_BUILD_FOLDER)
146153 $(JLINK) $(OUTPUT_PATH)erase-all.jlink
@@ -150,6 +157,10 @@ erase-all.jlink:
150157 $(MAKE_BUILD_FOLDER)
151158 printf "w4 4001e504 2\nw4 4001e50c 1\nsleep 100\nr\nexit\n" > $(OUTPUT_PATH)erase-all.jlink
152159
160+ erase-all.stlinkv2:
161+ $(MAKE_BUILD_FOLDER)
162+ $(OPENOCD) -c init -c 'nrf51 mass_erase' -c 'reset run' -c shutdown
163+
153164from-scratch: all flash.jlink flash-softdevice
154165 $(MAKE_BUILD_FOLDER)
155166 $(JLINK) $(OUTPUT_PATH)flash.jlink
You can’t perform that action at this time.
0 commit comments