allow to flash feather52 and feather52840 with jlink
add crc bypass magic to bootloader settting
This commit is contained in:
parent
c854e2dc17
commit
c10899d13f
|
@ -291,10 +291,23 @@ FLASHER ?=
|
|||
|
||||
ifeq ($(FLASHER),)
|
||||
|
||||
# Adafruit use bootloader that requires writing to its settting ( app valid = 0x0001, crc = 0x0000 )
|
||||
ifneq (,$(filter $(BOARD),feather52 feather52840))
|
||||
|
||||
flash: $(BUILD)/$(OUTPUT_FILENAME).hex
|
||||
nrfjprog --program $< --sectorerase -f $(MCU_VARIANT)
|
||||
nrfjprog --erasepage $(BOOT_SETTING_ADDR) -f $(MCU_VARIANT)
|
||||
nrfjprog --memwr $(BOOT_SETTING_ADDR) --val 0x00000001 -f $(MCU_VARIANT)
|
||||
nrfjprog --reset -f $(MCU_VARIANT)
|
||||
|
||||
else
|
||||
|
||||
flash: $(BUILD)/$(OUTPUT_FILENAME).hex
|
||||
nrfjprog --program $< --sectorerase -f $(MCU_VARIANT)
|
||||
nrfjprog --reset -f $(MCU_VARIANT)
|
||||
|
||||
endif
|
||||
|
||||
sd: $(BUILD)/$(OUTPUT_FILENAME).hex
|
||||
nrfjprog --eraseall -f $(MCU_VARIANT)
|
||||
nrfjprog --program $(SOFTDEV_HEX) -f $(MCU_VARIANT)
|
||||
|
|
|
@ -6,6 +6,7 @@ SOFTDEV_VERSION ?= 2.0.1
|
|||
LD_FILE = boards/feather52/custom_nrf52832_dfu_app_$(SOFTDEV_VERSION).ld
|
||||
BOOTLOADER_PKG = boards/feather52/bootloader/feather52_bootloader_$(SOFTDEV_VERSION)_s132_single.zip
|
||||
|
||||
BOOT_SETTING_ADDR = 0x7F000
|
||||
NRF_DEFINES += -DNRF52832_XXAA
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
|
|
|
@ -7,6 +7,7 @@ LD_FILE = boards/feather52840/bluefruit_nrf52840_s140_6.0.0.ld
|
|||
BOOT_UART_FILE = boards/feather52840/bootloader/uart/feather52840_bootloader_6.0.0_s140_single
|
||||
BOOT_USB_FILE = boards/feather52840/bootloader/usb/feather52840_bootloader_6.0.0_s140_single
|
||||
|
||||
BOOT_SETTING_ADDR = 0xFF000
|
||||
NRF_DEFINES += -DNRF52840_XXAA
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
|
|
Loading…
Reference in New Issue