File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ SD_VERSION = 6.1.1
17
17
SD_FILENAME = $(SD_NAME ) _nrf52_$(SD_VERSION )
18
18
SD_HEX = $(SD_PATH ) /$(SD_FILENAME ) _softdevice.hex
19
19
20
+ MBR_HEX = lib/softdevice/mbr/hex/mbr_nrf52_2.4.1_mbr.hex
21
+
20
22
# linker by MCU and SoftDevice eg. nrf52840_s140_v6.ld
21
23
LD_FILE = linker/$(MCU_SUB_VARIANT ) _$(SD_NAME ) _v$(word 1, $(subst ., ,$(SD_VERSION ) ) ) .ld
22
24
@@ -326,14 +328,25 @@ flash: $(BUILD)/$(OUT_FILE)-nosd.hex
326
328
@echo Flashing: $(notdir $< )
327
329
$(NRFJPROG ) --program $< --sectoranduicrerase -f nrf52 --reset
328
330
331
+ # dfu using CDC interface
329
332
dfu-flash : $(BUILD ) /$(MERGED_FILE ) .zip
330
333
@:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0)
331
334
$(NRFUTIL ) --verbose dfu serial --package $< -p $(SERIAL ) -b 115200 --singlebank --touch 1200
332
335
336
+ erase :
337
+ @echo Erasing flash
338
+ $(NRFJPROG ) -f nrf52 --eraseall
339
+
340
+ # flash SD only
333
341
sd :
334
342
@echo Flashing: $(SD_HEX )
335
343
$(NRFJPROG ) --program $(SD_HEX ) -f nrf52 --chiperase --reset
336
344
345
+ # flash MBR only
346
+ mbr :
347
+ @echo Flashing: $(MBR_HEX )
348
+ $(NRFJPROG ) --program $(MBR_HEX ) -f nrf52 --sectorerase
349
+
337
350
gdbflash : $(BUILD ) /$(MERGED_FILE ) .hex
338
351
@echo Flashing: $<
339
352
@$(GDB_BMP ) -nx --batch -ex ' load $<' -ex ' compare-sections' -ex ' kill'
You can’t perform that action at this time.
0 commit comments