]> git.donarmstrong.com Git - qmk_firmware.git/blob - docs/newbs_flashing.md
Add a newbie guide for people completely new to QMK (#2480)
[qmk_firmware.git] / docs / newbs_flashing.md
1 # Flashing Your Keyboard With QMK Toolbox
2
3 Now that you've built a custom firmware file you'll want to flash your keyboard. 
4
5 ## Load The File Into QMK Toolbox
6
7 Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory.
8
9 {% hint style='info' %}
10 If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
11
12 Windows:
13
14     start .
15
16 macOS:
17
18     open .
19 {% endhint %}
20
21 The firmware file always follows this naming format:
22
23     <keyboard_name>_<keymap_name>.{bin,hex}
24
25 For example, the `plank/rev5` with a `default` keymap will have this filename:
26
27     planck_rev5_default.hex
28
29 Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored. 
30
31 ## Put Your Keyboard Into DFU (Bootloader) Mode
32
33 In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written.
34
35 Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK or TMK and you have not been given specific instructions try the following, in order:
36
37 * Hold down both shift keys and press `Pause`
38 * Hold down both shift keys and press `B`
39 * Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys
40 * Press the physical `RESET` button on the bottom of the PCB
41 * Locate header pins on the PCB labeled `BOOT0` or `RESET`, short those together while plugging your PCB in
42
43 When you are successful you will see a message similar to this in QMK Toolbox:
44
45 ```
46 *** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
47 *** DFU device connected
48 ```
49
50 ## Flash Your Keyboard
51
52 Click the `Flash` button in QMK Toolbox. You will see output similar to the following:
53
54 ```
55 *** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
56 *** DFU device connected
57 *** Attempting to flash, please don't remove device
58 >>> dfu-programmer atmega32u4 erase --force
59     Erasing flash...  Success
60     Checking memory from 0x0 to 0x6FFF...  Empty.
61 >>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
62     Checking memory from 0x0 to 0x55FF...  Empty.
63     0%                            100%  Programming 0x5600 bytes...
64     [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
65     0%                            100%  Reading 0x7000 bytes...
66     [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
67     Validating...  Success
68     0x5600 bytes written into 0x7000 bytes memory (76.79%).
69 >>> dfu-programmer atmega32u4 reset
70     
71 *** DFU device disconnected
72 *** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
73 ```
74
75 ## Test It Out!
76
77 Congrats! Your custom firmware has been programmed to your keyboard!
78
79 Give it a try and make sure everything works the way you want it to. We've written [Testing and Debugging](newbs_testing_debugging.md) to round out this Newbie Guide, so head over there to learn about how to troubleshoot your custom functionality.