Skip to content

Commit 5b507ac

Browse files
committed
Move dfu-flash to be outside flasher check
1 parent bb3f0c8 commit 5b507ac

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Makefile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,6 @@ flash: $(BUILD)/$(OUT_FILE)-nosd.hex
405405
@echo Flashing: $(notdir $<)
406406
$(NRFJPROG) --program $< --sectoranduicrerase -f nrf52 --reset
407407

408-
# dfu using CDC interface
409-
dfu-flash: $(BUILD)/$(MERGED_FILE).zip
410-
@:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0)
411-
$(NRFUTIL) --verbose dfu serial --package $< -p $(SERIAL) -b 115200 --singlebank --touch 1200
412-
413408
erase:
414409
@echo Erasing flash
415410
$(NRFJPROG) -f nrf52 --eraseall
@@ -432,11 +427,7 @@ flash: $(BUILD)/$(OUT_FILE)-nosd.hex
432427
@echo Flashing: $(notdir $<)
433428
$(PYOCD) flash -t $(MCU_SUB_VARIANT) $<
434429

435-
# dfu unsupported with pyocd
436-
dfu-flash: $(BUILD)/$(MERGED_FILE).zip
437-
$(error dfu-flash is not implemented with pyocd as the FLASHER)
438-
439-
erase:
430+
erase:
440431
@echo Erasing flash
441432
$(PYOCD) erase -t $(MCU_SUB_VARIANT) --chip
442433

@@ -452,6 +443,13 @@ mbr:
452443

453444
endif
454445

446+
#------------------- Flash with NRFUTIL via DFU -------------------
447+
448+
# dfu using CDC interface
449+
dfu-flash: $(BUILD)/$(MERGED_FILE).zip
450+
@:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0)
451+
$(NRFUTIL) --verbose dfu serial --package $< -p $(SERIAL) -b 115200 --singlebank --touch 1200
452+
455453
#------------------- Debugging -------------------
456454

457455
gdbflash: $(BUILD)/$(MERGED_FILE).hex

0 commit comments

Comments
 (0)