aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-03-26 10:34:18 -0700
committerJack Humbert <jack.humb@gmail.com>2018-03-26 13:34:18 -0400
commitee1bb85542a297bb2086668ff757fcabf40a9a92 (patch)
tree88cc675d6e3da014201a9179b66479855ff94802 /docs
parent07b90db89758c42f7aacf52d93446b9407b87a98 (diff)
downloadqmk_firmware-ee1bb85542a297bb2086668ff757fcabf40a9a92.tar.gz
qmk_firmware-ee1bb85542a297bb2086668ff757fcabf40a9a92.zip
Expand Newb Guide flashing document (#2588)
* Add header info * Add DFU section * Add Caterina section * Add Halfkay section * Fix Typos * More typos
Diffstat (limited to 'docs')
-rw-r--r--docs/newbs_flashing.md171
1 files changed, 167 insertions, 4 deletions
diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md
index c466a4e4e..4cd7c5c44 100644
--- a/docs/newbs_flashing.md
+++ b/docs/newbs_flashing.md
@@ -1,8 +1,14 @@
1# Flashing Your Keyboard With QMK Toolbox 1# Flashing Your Keyboard
2 2
3Now that you've built a custom firmware file you'll want to flash your keyboard. 3Now that you've built a custom firmware file you'll want to flash your keyboard.
4 4
5## Load The File Into QMK Toolbox 5## Flashing Your Keyboard with QMK Toolbox
6
7The simplest way to flash your keyboard will be with the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases).
8
9However, the QMK Toolbox is only available for Windows and macOS currently. If you're using Linux (or just wish to flash the firmware from the command line), you'll have to use the [method outlined below](newbs_flashing.md#flash-your-keyboard-from-the-command-line).
10
11### Load The File Into QMK Toolbox
6 12
7Begin 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. 13Begin 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 14
@@ -28,7 +34,7 @@ For example, the `plank/rev5` with a `default` keymap will have this filename:
28 34
29Once 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. 35Once 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 36
31## Put Your Keyboard Into DFU (Bootloader) Mode 37### Put Your Keyboard Into DFU (Bootloader) Mode
32 38
33In 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. 39In 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 40
@@ -47,7 +53,7 @@ When you are successful you will see a message similar to this in QMK Toolbox:
47*** DFU device connected 53*** DFU device connected
48``` 54```
49 55
50## Flash Your Keyboard 56### Flash Your Keyboard
51 57
52Click the `Flash` button in QMK Toolbox. You will see output similar to the following: 58Click the `Flash` button in QMK Toolbox. You will see output similar to the following:
53 59
@@ -72,6 +78,163 @@ Click the `Flash` button in QMK Toolbox. You will see output similar to the foll
72*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 78*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
73``` 79```
74 80
81## Flash your Keyboard from the Command Line
82
83First thing you'll need to know is which bootloader that your keyboard uses. There are four main bootloaders that are used, usually. Pro-Micro and clones use CATERINA, and Teensy's use Halfkay, OLKB boards use QMK-DFU, and other atmega32u4 chips use DFU.
84
85You can find more information about the bootloaders in the [Flashing Instructions and Bootloader Information](flashing.md) page.
86
87If you know what bootloader that you're using, then when compiling the firmware, you can actually add some extra text to the `make` command to automate the flashing process.
88
89### DFU
90
91For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
92
93 make <my_keyboard>:<my_keymap>:dfu
94
95For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
96
97 make planck/rev5:xyverz:dfu
98
99Once it finishes compiling, it should output the following:
100
101```
102Linking: .build/planck_rev5_xyverz.elf [OK]
103Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
104Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
105Checking file size of planck_rev5_xyverz.hex
106 * File size is fine - 18574/28672
107 ```
108
109After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it.
110
111 dfu-programmer: no device present.
112 Error: Bootloader not found. Trying again in 5s.
113
114Once it does this, you'll want to reset the controller. It should then show output similiar to this:
115
116```
117*** Attempting to flash, please don't remove device
118>>> dfu-programmer atmega32u4 erase --force
119 Erasing flash... Success
120 Checking memory from 0x0 to 0x6FFF... Empty.
121>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
122 Checking memory from 0x0 to 0x55FF... Empty.
123 0% 100% Programming 0x5600 bytes...
124 [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
125 0% 100% Reading 0x7000 bytes...
126 [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
127 Validating... Success
128 0x5600 bytes written into 0x7000 bytes memory (76.79%).
129>>> dfu-programmer atmega32u4 reset
130```
131
132If you have any issues with this, you may need to this:
133
134 sudo make <my_keyboard>:<my_keymap>:dfu
135
136### Caterina
137
138For Arduino boards and their close (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
139
140 make <my_keyboard>:<my_keymap>:avrdude
141
142For example, if your keymap is named "xyverz" and you're building a keymap for a rev2 Lets Split, you'll use this command:
143
144 make lets_split/rev2:xyverz:avrdude
145
146Once the firmware finishes compiling, it will output something like this:
147
148```
149Linking: .build/lets_split_rev2_xyverz.elf [OK]
150Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK]
151Checking file size of lets_split_rev2_xyverz.hex [OK]
152 * File size is fine - 27938/28672
153Detecting USB port, reset your controller now..............
154```
155
156At this point, reset the board and then the script will detect the bootloader and then flash the board. The output should look something like this:
157
158```
159Detected controller on USB port at /dev/ttyS15
160
161Connecting to programmer: .
162Found programmer: Id = "CATERIN"; type = S
163 Software Version = 1.0; No Hardware Version given.
164Programmer supports auto addr increment.
165Programmer supports buffered memory access with buffersize=128 bytes.
166
167Programmer supports the following devices:
168 Device code: 0x44
169
170avrdude.exe: AVR device initialized and ready to accept instructions
171
172Reading | ################################################## | 100% 0.00s
173
174avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
175avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
176 To disable this feature, specify the -D option.
177avrdude.exe: erasing chip
178avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex"
179avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
180avrdude.exe: writing flash (27938 bytes):
181
182Writing | ################################################## | 100% 2.40s
183
184avrdude.exe: 27938 bytes of flash written
185avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex:
186avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex:
187avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
188avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes
189avrdude.exe: reading on-chip flash data:
190
191Reading | ################################################## | 100% 0.43s
192
193avrdude.exe: verifying ...
194avrdude.exe: 27938 bytes of flash verified
195
196avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF)
197
198avrdude.exe done. Thank you.
199```
200If you have any issues with this, you may need to this:
201
202 sudo make <my_keyboard>:<my_keymap>:avrdude
203
204## HalfKay
205
206For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
207
208 make <my_keyboard>:<my_keymap>:teensy
209
210For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command:
211
212 make erdogox_ez:xyverz:teensy
213
214Once the firmware finishes compiling, it will output something like this:
215
216```
217Linking: .build/ergodox_ez_xyverz.elf [OK]
218Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK]
219Checking file size of ergodox_ez_xyverz.hex [OK]
220 * File size is fine - 25584/32256
221 Teensy Loader, Command Line, Version 2.1
222Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage
223Waiting for Teensy device...
224 (hint: press the reset button)
225 ```
226
227 At this point, reset your board. Once you've done that, you'll see output like this:
228
229 ```
230 Found HalfKay Bootloader
231Read "./.build/ergodox_ez_drashna.hex": 28532 bytes, 88.5% usage
232Programming............................................................................................................................................................................
233...................................................
234Booting
235```
236
237
75## Test It Out! 238## Test It Out!
76 239
77Congrats! Your custom firmware has been programmed to your keyboard! 240Congrats! Your custom firmware has been programmed to your keyboard!