aboutsummaryrefslogtreecommitdiff
path: root/docs/flashing.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/flashing.md')
-rw-r--r--docs/flashing.md39
1 files changed, 34 insertions, 5 deletions
diff --git a/docs/flashing.md b/docs/flashing.md
index e5fe59f8f..bc418c415 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -2,7 +2,7 @@
2 2
3There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them. 3There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them.
4 4
5If you have a bootloader selected with the `BOOTLOADER` variable in your `rules.mk`, QMK will automatically calculate if your .hex file is the right size to be flashed to the device, and output the total size it bytes (along with the max). To run this process manually, compile with the target `check-size`, eg `make planck/rev4:default:check-size`. 5If you have a bootloader selected with the `BOOTLOADER` variable in your `rules.mk`, QMK will automatically calculate if your .hex file is the right size to be flashed to the device, and output the total size in bytes (along with the max). To run this process manually, compile with the target `check-size`, eg `make planck/rev4:default:check-size`.
6 6
7## DFU 7## DFU
8 8
@@ -71,13 +71,19 @@ Flashing sequence:
71 71
721. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters) 721. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
732. Wait for the OS to detect the device 732. Wait for the OS to detect the device
744. Flash a .hex file 743. Flash a .hex file
755. Wait for the device to reset automatically 754. Wait for the device to reset automatically
76 76
77or 77or
78 78
79 make <keyboard>:<keymap>:avrdude 79 make <keyboard>:<keymap>:avrdude
80 80
81or if you want to flash multiple boards, use the following command
82
83 make <keyboard>:<keymap>:avrdude-loop
84
85When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
86
81## Halfkay 87## Halfkay
82 88
83Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0). 89Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
@@ -100,5 +106,28 @@ Flashing sequence:
100 106
1011. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters) 1071. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
1022. Wait for the OS to detect the device 1082. Wait for the OS to detect the device
1034. Flash a .hex file 1093. Flash a .hex file
1045. Reset the device into application mode (may be done automatically) 1104. Reset the device into application mode (may be done automatically)
111
112## STM32
113
114All STM32 chips come preloaded with a factory bootloader that cannot be modified nor deleted. Some STM32 chips have bootloaders that do not come with USB programming (e.g. STM32F103) but the process is still the same.
115
116At the moment, no `BOOTLOADER` variable is needed on `rules.mk` for STM32.
117
118Compatible flashers:
119
120* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
121* [dfu-util](https://github.com/Stefan-Schmidt/dfu-util) / `:dfu-util` (recommended command line)
122
123Flashing sequence:
124
1251. Enter the bootloader using any of the following methods:
126 * Tap the `RESET` keycode (may not work on STM32F042 devices)
127 * If a reset circuit is present, tap the RESET button
128 * Otherwise, you need to bridge BOOT0 to VCC (via BOOT0 button or bridge), short RESET to GND (via RESET button or bridge), and then let go of the BOOT0 bridge
1292. Wait for the OS to detect the device
1303. Flash a .bin file
131 * You will receive a warning about the DFU signature; Just ignore it
1324. Reset the device into application mode (may be done automatically)
133 * If you are building from command line (e.g. `make planck/rev6:default:dfu-util`), make sure that `:leave` is passed to the `DFU_ARGS` variable inside your `rules.mk` (e.g. `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) so that your device resets after flashing