From 4003d077cef42d7a3405250ea6417db3a3549e9e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 20 Aug 2019 15:39:24 -0700 Subject: Add a universal flash command for cli (#6224) * Add universal flash command * Add bootloader info to I:C boards * Add support for ATSAM * Add messages for flash target * Message cleanup * Add USB ASP Flashing target * Make usbasp target more universal * Add phoney target for usbasp * Clarify error message when bootloader isn't matched --- message.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'message.mk') diff --git a/message.mk b/message.mk index ec9bacbf4..c8d2135d5 100644 --- a/message.mk +++ b/message.mk @@ -85,3 +85,5 @@ MSG_PYTHON_MISSING = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \ Python 3 is not installed. It will be required by a future version\n\ of qmk_firmware.\n\n\ Please run $(BOLD)util/qmk_install.sh$(NO_COLOR) to install all the dependencies QMK requires.\n\n +MSG_FLASH_BOOTLOADER = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's bootloader is not specified or is not supported by the \":flash\" target at this time.\n\n +MSG_FLASH_ARCH = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's architecture is not supported by the \":flash\" target at this time.\n\n -- cgit v1.3 From 44fd317a8793753b2af1bab8e4a4700024a768a5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 7 Sep 2019 09:06:39 -0700 Subject: Move Bootloader not found message to global variable (#6688) * Move Bootloader not found message to global variable * Apply suggestions from code review Co-Authored-By: fauxpark --- message.mk | 1 + tmk_core/avr.mk | 4 ++-- tmk_core/chibios.mk | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'message.mk') diff --git a/message.mk b/message.mk index c8d2135d5..dfbde2845 100644 --- a/message.mk +++ b/message.mk @@ -87,3 +87,4 @@ MSG_PYTHON_MISSING = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \ Please run $(BOLD)util/qmk_install.sh$(NO_COLOR) to install all the dependencies QMK requires.\n\n MSG_FLASH_BOOTLOADER = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's bootloader is not specified or is not supported by the \":flash\" target at this time.\n\n MSG_FLASH_ARCH = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's architecture is not supported by the \":flash\" target at this time.\n\n +MSG_BOOTLOADER_NOT_FOUND = $(ERROR_COLOR)ERROR:$(NO_COLOR) Bootloader not found. Trying again in 5s.\n diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 775f2a996..40dcdc3f6 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -147,7 +147,7 @@ define EXEC_DFU echo "Flashing '$(1)' for EE_HANDS split keyboard support." ;\ fi; \ until $(DFU_PROGRAMMER) $(MCU) get bootloader-version; do\ - echo "Error: Bootloader not found. Trying again in 5s." ;\ + printf "$(MSG_FLASH_BOOTLOADER)" ;\ sleep 5 ;\ done; \ if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ @@ -252,7 +252,7 @@ define EXEC_BOOTLOADHID # bootloadHid executable has no cross platform detect methods # so keep running bootloadHid if the output contains "The specified device was not found" until $(BOOTLOADHID_PROGRAMMER) -r $(BUILD_DIR)/$(TARGET).hex 2>&1 | tee /dev/stderr | grep -v "device was not found"; do\ - echo "Error: Bootloader not found. Trying again in 5s." ;\ + printf "$(MSG_FLASH_BOOTLOADER)" ;\ sleep 5 ;\ done endef diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 4b5b6d00b..5c757ec89 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -236,7 +236,7 @@ qmk: $(BUILD_DIR)/$(TARGET).bin define EXEC_DFU_UTIL until $(DFU_UTIL) -l | grep -q "Found DFU"; do\ - echo "Error: Bootloader not found. Trying again in 5s." ;\ + printf "$(MSG_FLASH_BOOTLOADER)" ;\ sleep 5 ;\ done $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin -- cgit v1.3 From 2df3799e3d3fe60ff6ed6159cd935d4356be70c3 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 21 Sep 2019 17:00:58 +1000 Subject: Add list-keymaps make target (#5563) --- Makefile | 13 +++++++++++++ message.mk | 5 +++++ 2 files changed, 18 insertions(+) (limited to 'message.mk') diff --git a/Makefile b/Makefile index 37f5f23db..508691f45 100644 --- a/Makefile +++ b/Makefile @@ -371,6 +371,9 @@ define PARSE_KEYBOARD # The same if all was specified else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true) $$(eval $$(call PARSE_ALL_KEYMAPS)) + # List all keymaps for the given keyboard + else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,list-keymaps),true) + $$(eval $$(call LIST_ALL_KEYMAPS)) # Try to match the specified keyamp with the list of known keymaps else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true) $$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM))) @@ -407,6 +410,16 @@ endef # endif # endef +# Prints a list of all known keymaps for the given keyboard +define LIST_ALL_KEYMAPS + COMMAND_true_LIST_KEYMAPS := \ + printf "$$(KEYMAPS)\n"; + COMMAND_false_LIST_KEYMAPS := \ + printf "$$(MSG_AVAILABLE_KEYMAPS)\n"; \ + printf "$$(KEYMAPS)\n"; + COMMANDS += LIST_KEYMAPS +endef + # $1 Keymap # This is the meat of compiling a keyboard, when entering this, everything is known # keyboard, subproject, and keymap diff --git a/message.mk b/message.mk index dfbde2845..53afba206 100644 --- a/message.mk +++ b/message.mk @@ -76,6 +76,11 @@ define GENERATE_MSG_MAKE_TEST endef MSG_MAKE_TEST = $(eval $(call GENERATE_MSG_MAKE_TEST))$(MSG_MAKE_TEST_ACTUAL) MSG_TEST = Testing $(BOLD)$(TEST_NAME)$(NO_COLOR) +define GENERATE_MSG_AVAILABLE_KEYMAPS + MSG_AVAILABLE_KEYMAPS_ACTUAL := Available keymaps for $(BOLD)$$(CURRENT_KB)$(NO_COLOR): +endef +MSG_AVAILABLE_KEYMAPS = $(eval $(call GENERATE_MSG_AVAILABLE_KEYMAPS))$(MSG_AVAILABLE_KEYMAPS_ACTUAL) + MSG_CHECK_FILESIZE = Checking file size of $(TARGET).hex MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n -- cgit v1.3