In my experience, I have found this to be frequently unreliable and inconsistent/indiscernable behaviour considering computer, operating system, or particular board used.
I see the QMK Documentation page on the Blackpill[5] explains that this has to with its 25MHz crystal; and because my MiniF4-36 design uses the pin A10 without an external pull-up resistor.
Not even "hold the boot button for 2 minutes[4]" was enough to help.
Ultimately, I think having an ST-Link device is necessary to at least flash an easier to use bootloader onto the board.
In the QMK Docs, "Using QMK" -> "Guides" -> "Flashing" -> "Flashing"[0], the following bootloaders are suggested:
-
For STM32F4 (e.g. the WeAct Studio MiniF4 "Black pill" boards):
-
- QMK will generate a
.uf2
firmware file if therules.mk
is configured correctly.
- QMK will generate a
-
-
For STM32F103 (e.g. the "blue pill" boards):
-
rogerclarkmelbourne/STM32duino-bootloader[2].
-
With QMK, and the
rules.mk
set to use this bootloader, (e.g. ashandwired/onekey/bluepill
has by default), the complied.bin
won't work if flashed to the board without this bootloader present. (e.g. flashing the keyboard firmware's.bin
usingst-flash
is insufficient). -
See stm32duino's wiki page on Upload methods[3] for more details.
-
-
[0] https://docs.qmk.fm/#/flashing
[1] https://github.com/adafruit/tinyuf2
[2] https://github.com/rogerclarkmelbourne/STM32duino-bootloader
[3] https://github.com/stm32duino/wiki/wiki/Upload-methods
[4] https://electronics.stackexchange.com/questions/291402/stm32f4-taking-2-minutes-to-enter-dfu