diff options
Diffstat (limited to 'docs/flashing.md')
-rw-r--r-- | docs/flashing.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/flashing.md b/docs/flashing.md index 83c97444e..da3c64c4a 100644 --- a/docs/flashing.md +++ b/docs/flashing.md | |||
@@ -171,6 +171,52 @@ Flashing sequence: | |||
171 | 3. Flash a .hex file | 171 | 3. Flash a .hex file |
172 | 4. Reset the device into application mode (may be done automatically) | 172 | 4. Reset the device into application mode (may be done automatically) |
173 | 173 | ||
174 | ### QMK HID | ||
175 | |||
176 | QMK maintains [a fork of the LUFA HID bootloader](https://github.com/qmk/lufa/tree/master/Bootloaders/HID), which uses a USB HID Endpoint for flashing in the way that the PJRC's Teensy Loader flasher and HalfKay bootloader work. Additionally, it performs a simple matrix scan for exiting the bootloader and returning to the application, as well as flashing an LED/making a ticking noise with a speaker when things are happening. | ||
177 | |||
178 | To ensure compatibility with the QMK HID bootloader, make sure this block is present in your `rules.mk`: | ||
179 | |||
180 | ```make | ||
181 | # Bootloader selection | ||
182 | BOOTLOADER = qmk-hid | ||
183 | ``` | ||
184 | |||
185 | To enable the additional features, add the following defines to your `config.h`: | ||
186 | |||
187 | ```c | ||
188 | #define QMK_ESC_OUTPUT F1 // COL pin if COL2ROW | ||
189 | #define QMK_ESC_INPUT D5 // ROW pin if COL2ROW | ||
190 | // Optional: | ||
191 | //#define QMK_LED E6 | ||
192 | //#define QMK_SPEAKER C6 | ||
193 | ``` | ||
194 | |||
195 | Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader. | ||
196 | |||
197 | The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string. | ||
198 | |||
199 | To generate this bootloader, use the `bootloader` target, eg. `make planck/rev4:default:bootloader`. To generate a production-ready .hex file (combining QMK and the bootloader), use the `production` target, eg. `make planck/rev4:default:production`. | ||
200 | |||
201 | Compatible flashers: | ||
202 | |||
203 | * TBD | ||
204 | * Currently, you need to either use the [Python script](https://github.com/qmk/lufa/tree/master/Bootloaders/HID/HostLoaderApp_python), or compile [`hid_bootloader_cli`](https://github.com/qmk/lufa/tree/master/Bootloaders/HID/HostLoaderApp), from the LUFA repo. Homebrew may (will) have support for this directly (via `brew install qmk/qmk/hid_bootloader_cli`). | ||
205 | |||
206 | Flashing sequence: | ||
207 | |||
208 | 1. Enter the bootloader using any of the following methods: | ||
209 | * Press the `RESET` keycode | ||
210 | * Press the `RESET` button on the PCB if available | ||
211 | * short RST to GND quickly | ||
212 | 2. Wait for the OS to detect the device | ||
213 | 3. Flash a .hex file | ||
214 | 4. Reset the device into application mode (may be done automatically) | ||
215 | |||
216 | ### `make` Targets | ||
217 | |||
218 | * `:qmk-hid`: Checks every 5 seconds until a DFU device is available, and then flashes the firmware. | ||
219 | |||
174 | ## STM32/APM32 DFU | 220 | ## STM32/APM32 DFU |
175 | 221 | ||
176 | All STM32 and APM32 MCUs, except for F103 (see the [STM32duino section](#stm32duino)) come preloaded with a factory bootloader that cannot be modified nor deleted. | 222 | All STM32 and APM32 MCUs, except for F103 (see the [STM32duino section](#stm32duino)) come preloaded with a factory bootloader that cannot be modified nor deleted. |