summaryrefslogtreecommitdiff
path: root/platforms/chibios/flash.mk
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2022-11-08 17:14:27 -0800
committerDrashna Jael're <drashna@live.com>2022-11-08 17:14:27 -0800
commit64f04b30c2f48fc0e7c49ca043443f03dc56df94 (patch)
treee0f374d3b92bacefd22c31e7bda8ee1c6fcb37de /platforms/chibios/flash.mk
parentd9f575fa86ca10b990958d4e677c6a0a387dc7c3 (diff)
parent96c48a5f4aa461ed31fd4ee61151ac206e16fb5f (diff)
Merge tag '0.18.16' into firmware22
Diffstat (limited to 'platforms/chibios/flash.mk')
-rw-r--r--platforms/chibios/flash.mk12
1 files changed, 9 insertions, 3 deletions
diff --git a/platforms/chibios/flash.mk b/platforms/chibios/flash.mk
index a91ef2cf35..023da34bb5 100644
--- a/platforms/chibios/flash.mk
+++ b/platforms/chibios/flash.mk
@@ -54,11 +54,11 @@ endef
# TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS
# within the emulated eeprom via dfu-util or another tool
-ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-left))
+ifneq (,$(filter $(MAKECMDGOALS), dfu-util-split-left uf2-split-left))
OPT_DEFS += -DINIT_EE_HANDS_LEFT
endif
-ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-right))
+ifneq (,$(filter $(MAKECMDGOALS), dfu-util-split-right uf2-split-right))
OPT_DEFS += -DINIT_EE_HANDS_RIGHT
endif
@@ -66,6 +66,10 @@ dfu-util-split-left: dfu-util
dfu-util-split-right: dfu-util
+uf2-split-left: flash
+
+uf2-split-right: flash
+
ST_LINK_CLI ?= st-link_cli
ST_LINK_ARGS ?=
@@ -96,14 +100,16 @@ endef
teensy: $(BUILD_DIR)/$(TARGET).hex cpfirmware sizeafter
$(call EXEC_TEENSY)
-
flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter
+ $(SILENT) || printf "Flashing for bootloader: $(BLUE)$(BOOTLOADER)$(NO_COLOR)\n"
ifneq ($(strip $(PROGRAM_CMD)),)
$(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD)
else ifeq ($(strip $(BOOTLOADER)),kiibohd)
$(UNSYNC_OUTPUT_CMD) && $(call EXEC_DFU_UTIL)
else ifeq ($(strip $(BOOTLOADER)),tinyuf2)
$(UNSYNC_OUTPUT_CMD) && $(call EXEC_UF2_UTIL_DEPLOY)
+else ifeq ($(strip $(BOOTLOADER)),rp2040)
+ $(UNSYNC_OUTPUT_CMD) && $(call EXEC_UF2_UTIL_DEPLOY)
else ifeq ($(strip $(MCU_FAMILY)),KINETIS)
$(UNSYNC_OUTPUT_CMD) && $(call EXEC_TEENSY)
else ifeq ($(strip $(MCU_FAMILY)),MIMXRT1062)