File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -419,6 +419,24 @@ sd: $(BUILD)/$(OUTPUT_FILENAME).elf
419
419
-ex ' quit' \
420
420
$<
421
421
422
+ else ifeq ($(FLASHER), openocd)
423
+
424
+ OPENOCD ?= openocd
425
+
426
+ ifeq ($(MCU_VARIANT ) , nrf51)
427
+ OPENOCD_TARGET ?= target/nrf52.cfg
428
+ else ifeq ($(MCU_VARIANT), nrf52)
429
+ OPENOCD_TARGET ?= target/nrf52.cfg
430
+ else
431
+ $(error Unsupported openocd target)
432
+ endif
433
+
434
+ deploy : $(BUILD ) /$(OUTPUT_FILENAME ) .hex
435
+ $(Q )$(OPENOCD ) -f interface/cmsis-dap.cfg -f $(OPENOCD_TARGET ) -c " init" -c " program $< verify reset" -c " exit"
436
+
437
+ sd : $(BUILD ) /$(OUTPUT_FILENAME ) .hex
438
+ $(Q )$(OPENOCD ) -f interface/cmsis-dap.cfg -f $(OPENOCD_TARGET ) -c " init" -c " program $( SOFTDEV_HEX) verify reset" -c " exit"
439
+
422
440
endif
423
441
424
442
flash : deploy
Original file line number Diff line number Diff line change @@ -5,3 +5,7 @@ SOFTDEV_VERSION = 6.1.1
5
5
LD_FILES += boards/nrf52840_1M_256k.ld
6
6
7
7
NRF_DEFINES += -DNRF52840_XXAA
8
+
9
+ # The nrf52-particle.cfg is not included here, it can be found in the Particle Workbench
10
+ # Note: This requires openocd >0.10
11
+ OPENOCD_TARGET ?= boards/$(BOARD ) /nrf52-particle.cfg
You can’t perform that action at this time.
0 commit comments