1
0
Fork 0

Enable CLI flashing via mdloader (#14729)

* Enable CLI flashing via mdloader

* remove flag

* Update qmk flash help
This commit is contained in:
Joel Challis 2021-10-15 22:07:33 +01:00 committed by GitHub
parent d7f69dc620
commit 40bc5a8192
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 6 deletions

View file

@ -3,9 +3,20 @@
# Architecture or project specific options
#
MDLOADER_CLI ?= mdloader
define EXEC_MDLOADER
$(MDLOADER_CLI) --first --download $(BUILD_DIR)/$(TARGET).bin --restart
endef
mdloader: bin
$(call EXEC_MDLOADER)
flash: bin
ifneq ($(strip $(PROGRAM_CMD)),)
$(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD)
else ifeq ($(strip $(ARM_ATSAM)),SAMD51J18A)
$(UNSYNC_OUTPUT_CMD) && $(call EXEC_MDLOADER)
else
$(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_ARCH)"
endif