Enable CLI flashing via mdloader (#14729)

* Enable CLI flashing via mdloader

* remove flag

* Update qmk flash help
This commit is contained in:
Joel Challis authored and GitHub committed 2021-10-15 22:07:33 +01:00
1 parent d7f69dc620
commit 40bc5a8192
3 files changed
+21 -6

No files matched your search

+11
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