You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
571 B

  1. # Hey Emacs, this is a -*- makefile -*-
  2. ##############################################################################
  3. # Architecture or project specific options
  4. #
  5. MDLOADER_CLI ?= mdloader
  6. define EXEC_MDLOADER
  7. $(MDLOADER_CLI) --first --download $(BUILD_DIR)/$(TARGET).bin --restart
  8. endef
  9. mdloader: bin
  10. $(call EXEC_MDLOADER)
  11. flash: bin
  12. ifneq ($(strip $(PROGRAM_CMD)),)
  13. $(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD)
  14. else ifeq ($(strip $(ARM_ATSAM)),SAMD51J18A)
  15. $(UNSYNC_OUTPUT_CMD) && $(call EXEC_MDLOADER)
  16. else
  17. $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_ARCH)"
  18. endif