]> git.donarmstrong.com Git - qmk_firmware.git/blob - docs/flashing.md
adds flashing docs
[qmk_firmware.git] / docs / flashing.md
1 # Flashing Intrustructions
2
3 There 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
5 ## DFU
6
7 Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by many keyboards that have their own ICs on their PCBs (Older OLKB boards, Clueboards). Some keyboards may also use LUFA's DFU bootloader (or QMK's fork) (Newer OLKB boards) that adds in additional features specific to that hardware.
8
9 These bootloaders are usually 4096 bytes for the atmega32u4 chip. 
10
11 Compatible flashers:
12
13 * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
14 * [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended commandline)
15 * [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended)
16
17 Flashing sequence:
18
19 1. Press the `RESET` keycode, or tap the RESET button (or short RST to GND).
20 2. Wait for the OS to detect the device
21 3. Erase the memory (may be done automatically)
22 4. Flash a .hex file
23 5. Reset the device into application mode (may be done automatically)
24
25 or:
26
27     make <keyboard>:<keymap>:dfu
28
29 ## Caterina
30
31 Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
32
33 This block of code allows for Caterina compatibility in QMK:
34
35     #define CATERINA_BOOTLOADER
36
37 These bootloaders are usually 4096 bytes for the atmega32u4 chip. 
38
39 Compatible flashers:
40
41 * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
42 * [avrdude](http://www.nongnu.org/avrdude/) with avr109 / `:avrdude` (recommended commandline)
43 * [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
44
45 Flashing sequence:
46
47 1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
48 2. Wait for the OS to detect the device
49 4. Flash a .hex file
50 5. Wait for the device to reset automatically
51
52 or
53
54     make <keyboard>:<keymap>:avrdude
55
56 ## Halfkay
57
58 Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
59
60 This bootloader is 512 bytes.
61
62 Compatible flashers:
63
64 * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
65 * [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
66 * [Teensy Loader Command Line](https://www.pjrc.com/teensy/loader_cli.html) (recommended commandline)
67
68 Flashing sequence:
69
70 1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
71 2. Wait for the OS to detect the device
72 4. Flash a .hex file
73 5. Reset the device into application mode (may be done automatically)
74