Skip to content

Commit 2de70e6

Browse files
authored
Add uf2-split-* make targets. (#17257)
1 parent 31fb141 commit 2de70e6

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

docs/feature_split_keyboard.md

+3
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ Next, you will have to flash the EEPROM files once for the correct hand to the c
141141
* ARM controllers with a DFU compatible bootloader (e.g. Proton-C):
142142
* `:dfu-util-split-left`
143143
* `:dfu-util-split-right`
144+
* ARM controllers with a UF2 compatible bootloader:
145+
* `:uf2-split-left`
146+
* `:uf2-split-right`
144147

145148
Example:
146149

docs/flashing.md

+4
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,7 @@ CLI Flashing sequence:
358358
2. Wait for the OS to detect the device
359359
3. Flash via QMK CLI eg. `qmk flash --keyboard handwired/onekey/blackpill_f411_tinyuf2 --keymap default`
360360
4. Wait for the keyboard to become available
361+
362+
### `make` Targets
363+
364+
* `:uf2-split-left` and `:uf2-split-right`: Flashes the firmware but also sets the handedness setting in EEPROM by generating a side specific firmware.

lib/python/qmk/cli/flash.py

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def print_bootloader_help():
3333
cli.echo('\tdfu-split-right')
3434
cli.echo('\tdfu-util-split-left')
3535
cli.echo('\tdfu-util-split-right')
36+
cli.echo('\tuf2-split-left')
37+
cli.echo('\tuf2-split-right')
3638
cli.echo('For more info, visit https://docs.qmk.fm/#/flashing')
3739

3840

platforms/chibios/flash.mk

+6-2
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,22 @@ endef
5454

5555
# TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS
5656
# within the emulated eeprom via dfu-util or another tool
57-
ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-left))
57+
ifneq (,$(filter $(MAKECMDGOALS), dfu-util-split-left uf2-split-left))
5858
OPT_DEFS += -DINIT_EE_HANDS_LEFT
5959
endif
6060

61-
ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-right))
61+
ifneq (,$(filter $(MAKECMDGOALS), dfu-util-split-right uf2-split-right))
6262
OPT_DEFS += -DINIT_EE_HANDS_RIGHT
6363
endif
6464

6565
dfu-util-split-left: dfu-util
6666

6767
dfu-util-split-right: dfu-util
6868

69+
uf2-split-left: flash
70+
71+
uf2-split-right: flash
72+
6973
ST_LINK_CLI ?= st-link_cli
7074
ST_LINK_ARGS ?=
7175

0 commit comments

Comments
 (0)