Files
qmk/platforms/arm_atsam/flash.mk
T

23 lines
571 B
Makefile
Raw Normal View History

# Hey Emacs, this is a -*- makefile -*-
##############################################################################
# Architecture or project specific options
#
2021-10-15 22:07:33 +01:00
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)),)
2021-08-18 01:46:59 +03:00
$(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD)
2021-10-15 22:07:33 +01:00
else ifeq ($(strip $(ARM_ATSAM)),SAMD51J18A)
$(UNSYNC_OUTPUT_CMD) && $(call EXEC_MDLOADER)
else
$(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_ARCH)"
endif