aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/flashing.md1
-rw-r--r--lib/python/qmk/cli/flash.py1
-rw-r--r--tmk_core/chibios.mk5
3 files changed, 7 insertions, 0 deletions
diff --git a/docs/flashing.md b/docs/flashing.md
index 1f71c253c..5c245c567 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -239,3 +239,4 @@ There are a number of DFU commands that you can use to flash firmware to a STM32
239* `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards. 239* `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards.
240* `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards. 240* `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards.
241* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. 241* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util.
242* `:st-flash` - This allows you to flash the firmware via the `st-flash` utility from [STLink Tools](https://github.com/stlink-org/stlink), rather than dfu-util.
diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py
index f8497071e..cefb9ca31 100644
--- a/lib/python/qmk/cli/flash.py
+++ b/lib/python/qmk/cli/flash.py
@@ -27,6 +27,7 @@ def print_bootloader_help():
27 cli.echo('\tdfu-util-split-left') 27 cli.echo('\tdfu-util-split-left')
28 cli.echo('\tdfu-util-split-right') 28 cli.echo('\tdfu-util-split-right')
29 cli.echo('\tst-link-cli') 29 cli.echo('\tst-link-cli')
30 cli.echo('\tst-flash')
30 cli.echo('For more info, visit https://docs.qmk.fm/#/flashing') 31 cli.echo('For more info, visit https://docs.qmk.fm/#/flashing')
31 32
32 33
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index 4e8abc9be..a218488a1 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -318,12 +318,14 @@ ifneq ("$(SERIAL)","")
318endif 318endif
319 319
320ST_LINK_ARGS ?= 320ST_LINK_ARGS ?=
321ST_FLASH_ARGS ?=
321 322
322# List any extra directories to look for libraries here. 323# List any extra directories to look for libraries here.
323EXTRALIBDIRS = $(RULESPATH)/ld 324EXTRALIBDIRS = $(RULESPATH)/ld
324 325
325DFU_UTIL ?= dfu-util 326DFU_UTIL ?= dfu-util
326ST_LINK_CLI ?= st-link_cli 327ST_LINK_CLI ?= st-link_cli
328ST_FLASH ?= st-flash
327 329
328define EXEC_DFU_UTIL 330define EXEC_DFU_UTIL
329 until $(DFU_UTIL) -l | grep -q "Found DFU"; do\ 331 until $(DFU_UTIL) -l | grep -q "Found DFU"; do\
@@ -357,6 +359,9 @@ dfu-util-split-right: dfu-util
357st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter 359st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter
358 $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst 360 $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst
359 361
362st-flash: $(BUILD_DIR)/$(TARGET).hex sizeafter
363 $(ST_FLASH) $(ST_FLASH_ARGS) --reset --format ihex write $(BUILD_DIR)/$(TARGET).hex
364
360 365
361# Autodetect teensy loader 366# Autodetect teensy loader
362ifndef TEENSY_LOADER_CLI 367ifndef TEENSY_LOADER_CLI