mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
use adafruit-nrfutil dfu as default flash target for feather nrf52840
This commit is contained in:
parent
a619511631
commit
90fea785c6
@ -14,6 +14,13 @@ CP = cp
|
||||
RM = rm
|
||||
PYTHON ?= python
|
||||
|
||||
check_defined = \
|
||||
$(strip $(foreach 1,$1, \
|
||||
$(call __check_defined,$1,$(strip $(value 2)))))
|
||||
__check_defined = \
|
||||
$(if $(value $1),, \
|
||||
$(error Undefined make flag: $1$(if $2, ($2))))
|
||||
|
||||
# Select the board to build for.
|
||||
ifeq ($(BOARD),)
|
||||
$(info You must provide a BOARD parameter with 'BOARD=')
|
||||
|
@ -50,5 +50,10 @@ JLINK_IF = swd
|
||||
# For uf2 conversion
|
||||
UF2_FAMILY = 0xADA52840
|
||||
|
||||
# flash using jlink
|
||||
flash: flash-jlink
|
||||
$(BUILD)/$(BOARD)-firmware.zip: $(BUILD)/$(BOARD)-firmware.hex
|
||||
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
|
||||
|
||||
# flash using adafruit-nrfutil dfu
|
||||
flash: $(BUILD)/$(BOARD)-firmware.zip
|
||||
@:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0)
|
||||
adafruit-nrfutil --verbose dfu serial --package $^ -p $(SERIAL) -b 115200 --singlebank --touch 1200
|
||||
|
Loading…
x
Reference in New Issue
Block a user