@@ -132,7 +132,7 @@ SRC_C += \
132
132
lib/tinyusb/src/class/msc/msc_device.c \
133
133
lib/tinyusb/src/class/cdc/cdc_device.c \
134
134
lib/tinyusb/src/tusb.c \
135
-
135
+
136
136
endif
137
137
138
138
DRIVERS_SRC_C += $(addprefix modules/,\
@@ -275,16 +275,24 @@ sd: $(BUILD)/$(OUTPUT_FILENAME).hex
275
275
276
276
bootloader :
277
277
nrfjprog --program $(BOOT_FILE ) .hex -f nrf52 --chiperase --reset
278
-
278
+
279
279
else ifeq ($(FLASHER), pyocd)
280
280
281
281
flash : $(BUILD ) /$(OUTPUT_FILENAME ) .hex
282
- pyocd-flashtool -t $(MCU_VARIANT ) $<
282
+ pyocd-flashtool -t $(MCU_SUB_VARIANT ) $< --sector_erase
283
+ pyocd-tool -t $(MCU_SUB_VARIANT ) erase $(BOOT_SETTING_ADDR )
284
+ pyocd-tool -t $(MCU_SUB_VARIANT ) write32 $(BOOT_SETTING_ADDR ) 0x00000001
285
+ pyocd-tool -t $(MCU_SUB_VARIANT ) reset
283
286
284
287
sd : $(BUILD ) /$(OUTPUT_FILENAME ) .hex
285
- pyocd-flashtool -t $(MCU_VARIANT ) --chip_erase
286
- pyocd-flashtool -t $(MCU_VARIANT ) $(SOFTDEV_HEX )
287
- pyocd-flashtool -t $(MCU_VARIANT ) $<
288
+ pyocd-flashtool -t $(MCU_SUB_VARIANT ) --chip_erase
289
+ pyocd-flashtool -t $(MCU_SUB_VARIANT ) $(SOFTDEV_HEX )
290
+ pyocd-flashtool -t $(MCU_SUB_VARIANT ) $< --sector_erase
291
+ pyocd-tool -t $(MCU_SUB_VARIANT ) reset $(BOOT_SETTING_ADDR )
292
+
293
+ bootloader :
294
+ pyocd-flashtool -t $(MCU_SUB_VARIANT ) $(BOOT_FILE ) .hex --chip_erase
295
+ pyocd-tool -t $(MCU_SUB_VARIANT ) reset
288
296
289
297
endif
290
298
0 commit comments