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.

23 lines
653 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. $(SILENT) || printf "Flashing for bootloader: $(BLUE)$(BOOTLOADER)$(NO_COLOR)\n"
  13. ifneq ($(strip $(PROGRAM_CMD)),)
  14. $(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD)
  15. else ifeq ($(strip $(ARM_ATSAM)),SAMD51J18A)
  16. $(UNSYNC_OUTPUT_CMD) && $(call EXEC_MDLOADER)
  17. else
  18. $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_ARCH)"
  19. endif