aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/chibios.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/chibios.mk')
-rw-r--r--tmk_core/chibios.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index c25e28707..62e156187 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -248,6 +248,21 @@ dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter
# Legacy alias
dfu-util-wait: dfu-util
+# 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))
+ OPT_DEFS += -DINIT_EE_HANDS_LEFT
+endif
+
+ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-right))
+ OPT_DEFS += -DINIT_EE_HANDS_RIGHT
+endif
+
+dfu-util-split-left: dfu-util
+
+dfu-util-split-right: dfu-util
+
+
st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter
$(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst