aboutsummaryrefslogtreecommitdiff
path: root/docs/flashing.md
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-11-27 23:08:21 -0500
committerGitHub <noreply@github.com>2017-11-27 23:08:21 -0500
commit9fdc27626097ae03b767a09427efc90475d90955 (patch)
treea555c38f1b714af6e2c2c96187552757d08224b9 /docs/flashing.md
parent9113f3387a670373919fe62899b0ab27e9d89eba (diff)
downloadqmk_firmware-9fdc27626097ae03b767a09427efc90475d90955.tar.gz
qmk_firmware-9fdc27626097ae03b767a09427efc90475d90955.zip
Updates bootloader settings, adds file size check (#2029)
* pull fuse settings for bootloader jump * fix 32a chips * make automatic bootloader selection optional * quantify bootloaders * fixs #164, speeds up dfu reset * fix for chips w/o usb * missing an n * fix bootloader sizes, use words for addresses * fix bmini, pearl, and [[ issue, make things quiet * ignore avr errors on arm for now * update settings for the light * document bootloader stuff * add bootloader title
Diffstat (limited to 'docs/flashing.md')
-rw-r--r--docs/flashing.md45
1 files changed, 38 insertions, 7 deletions
diff --git a/docs/flashing.md b/docs/flashing.md
index a61634d21..5b3c1a444 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -1,12 +1,20 @@
1# Flashing Intrustructions 1# Flashing Intrustructions / Bootloader Information
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`.
6
5## DFU 7## DFU
6 8
7Atmel'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. 9Atmel'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 10
9These bootloaders are usually 4096 bytes for the atmega32u4 chip. 11To ensure compatability with the DFU bootloader, make sure this block is present your `rules.mk` (optionally with `lufa-dfu` or `qmk-dfu` instead):
12
13 # Bootloader
14 # This definition is optional, and if your keyboard supports multiple bootloaders of
15 # different sizes, comment this out, and the correct address will be loaded
16 # automatically (+60). See bootloader.mk for all options.
17 BOOTLOADER = atmel-dfu
10 18
11Compatible flashers: 19Compatible flashers:
12 20
@@ -26,15 +34,32 @@ or:
26 34
27 make <keyboard>:<keymap>:dfu 35 make <keyboard>:<keymap>:dfu
28 36
37### QMK DFU
38
39QMK has a fork of the LUFA DFU bootloader that allows for 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. To enable these features, use this block in your `config.h` (The key that exits the bootloader needs to be hooked-up to the INPUT and OUTPUT defined here):
40
41 #define QMK_ESC_OUTPUT F1 // usually COL
42 #define QMK_ESC_INPUT D5 // usually ROW
43 #define QMK_LED E6
44 #define QMK_SPEAKER C6
45
46The Manufacturer and Product names are automatically pulled from your `config.h`, and "Bootloader" is added to the product.
47
48To generate this bootloader, use the `bootloader` target, eg `make planck/rev4:default:bootloader`.
49
50To generate a production-ready .hex file (containing the application and the bootloader), use the `production` target, eg `make planck/rev4:default:production`.
51
29## Caterina 52## Caterina
30 53
31Arduino 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. 54Arduino 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 55
33This block of code allows for Caterina compatibility in QMK: 56To ensure compatability with the Caterina bootloader, make sure this block is present your `rules.mk`:
34 57
35 #define CATERINA_BOOTLOADER 58 # Bootloader
36 59 # This definition is optional, and if your keyboard supports multiple bootloaders of
37These bootloaders are usually 4096 bytes for the atmega32u4 chip. 60 # different sizes, comment this out, and the correct address will be loaded
61 # automatically (+60). See bootloader.mk for all options.
62 BOOTLOADER = caterina
38 63
39Compatible flashers: 64Compatible flashers:
40 65
@@ -57,7 +82,13 @@ or
57 82
58Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0). 83Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
59 84
60This bootloader is 512 bytes. 85To ensure compatability with the Halfkay bootloader, make sure this block is present your `rules.mk`:
86
87 # Bootloader
88 # This definition is optional, and if your keyboard supports multiple bootloaders of
89 # different sizes, comment this out, and the correct address will be loaded
90 # automatically (+60). See bootloader.mk for all options.
91 BOOTLOADER = halfkay
61 92
62Compatible flashers: 93Compatible flashers:
63 94