aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2017-08-05 20:54:34 -0700
committerJack Humbert <jack.humb@gmail.com>2017-08-16 15:47:20 -0400
commite6c638bed1fa0a48bb6f8697b2a61717c4fd0992 (patch)
treed82e001a7fe61eeb6311efc69ec95e03aa69bdfa
parent89bcdde92779d5f9a4ca5a3947d5720baf09b75c (diff)
downloadqmk_firmware-e6c638bed1fa0a48bb6f8697b2a61717c4fd0992.tar.gz
qmk_firmware-e6c638bed1fa0a48bb6f8697b2a61717c4fd0992.zip
Overhaul the Getting Started section and add a FAQ section
-rw-r--r--docs/_summary.md19
-rw-r--r--docs/faq.md218
-rw-r--r--docs/faq_debug.md203
-rw-r--r--docs/faq_general.md20
-rw-r--r--docs/faq_keymap.md2
-rw-r--r--docs/getting_started_build_tools.md (renamed from docs/build_environment_setup.md)132
-rw-r--r--docs/getting_started_github.md (renamed from docs/how_to_github.md)0
-rw-r--r--docs/getting_started_instroduction.md47
-rw-r--r--docs/getting_started_make_guide.md (renamed from docs/make_instructions.md)0
-rw-r--r--docs/getting_started_vagrant.md (renamed from docs/vagrant_guide.md)0
-rw-r--r--docs/qmk_overview.md75
11 files changed, 351 insertions, 365 deletions
diff --git a/docs/_summary.md b/docs/_summary.md
index 0f65de0dd..72deb9ba5 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -1,11 +1,15 @@
1* [Getting started](README.md) 1* [Getting started](README.md)
2 * [QMK Overview](qmk_overview.md) 2 * [QMK Introduction](getting_started_introduction.md)
3 * [Build Environment Setup](build_environment_setup.md) 3 * [Install Build Tools](getting_started_build_tools.md)
4 * [Vagrant Guide](vagrant_guide.md) 4 * Alternative: [Vagrant Guide](getting_started_vagrant_guide.md)
5 * [Make instructions](make_instructions.md) 5 * [Build/Compile instructions](getting_started_make_guide.md)
6 * [FAQ: Creating a Keymap](faq_keymap.md) 6 * [How to Use Github](getting_started_github.md)
7 * [FAQ: Compiling QMK](faq_build.md) 7
8 * [How to Github](how_to_github.md) 8* [FAQ](faq.md)
9 * [General FAQ](faq_general.md)
10 * [Build/Compile QMK](faq_build.md)
11 * [Debugging/Troubleshooting QMK](faq_debug.md)
12 * [Keymap](faq_keymap.md)
9 13
10* [Features](features.md) 14* [Features](features.md)
11 * [Layer switching](key_functions.md) 15 * [Layer switching](key_functions.md)
@@ -43,5 +47,4 @@
43 * [Understanding QMK](understanding_qmk.md) 47 * [Understanding QMK](understanding_qmk.md)
44 48
45* Other Topics 49* Other Topics
46 * [General FAQ](faq.md)
47 * [Using Eclipse with QMK](eclipse.md) 50 * [Using Eclipse with QMK](eclipse.md)
diff --git a/docs/faq.md b/docs/faq.md
index 3287578ac..506f57a72 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -1,216 +1,6 @@
1# Frequently Asked Questions 1# Frequently Asked Questions
2 2
3## General 3* [General](faq_general.md)
4 4* [Building or Compiling QMK](faq_build.md)
5### What is QMK? 5* [Debugging and Troubleshooting QMK](faq_debug.md)
6 6* [Keymap](faq_keymap.md)
7[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard).
8
9### Why the name Quantum?
10
11<!-- FIXME -->
12
13### What Differences Are There Between QMK and TMK?
14
15TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
16
17From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Quantum Keycodes](quantum_keycodes.html).
18
19From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follows the quality standards. These are mostly community maintained, but the QMK team also helps when necessary.
20
21Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
22
23# Building
24
25## Windows
26
27### I'm on Windows Vista, 7, or 8, how do I setup my build environment?
28
29Follow the build instructions to [install MHV AVR Tools](https://docs.qmk.fm/build_environment_setup.html#windows-vista-and-later).
30
31### I'm on Windows 10 without the Creators Update. Do I have to install it?
32
33No, but if you don't install the creators update you will not be able to build and flash with a single command. You will be able to build but to flash you will have to use a separate program, such as [QMK Flasher](https://github.com/qmk/qmk_flasher).
34
35# Troubleshooting
36
37## Debug Console
38### hid_listen can't recognize device
39When debug console of your device is not ready you will see like this:
40
41```
42Waiting for device:.........
43```
44
45once the device is pluged in then *hid_listen* finds it you will get this message:
46
47```
48Waiting for new device:.........................
49Listening:
50```
51
52If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile]
53
54You may need privilege to access the device on OS like Linux.
55- try `sudo hid_listen`
56
57### Can't get message on console
58Check:
59- *hid_listen* finds your device. See above.
60- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
61- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**.
62- try using 'print' function instead of debug print. See **common/print.h**.
63- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
64
65### Linux or UNIX like system requires Super User privilege
66Just use 'sudo' to execute *hid_listen* with privilege.
67```
68$ sudo hid_listen
69```
70
71Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
72
73File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
74```
75# tmk keyboard products https://github.com/tmk/tmk_keyboard
76SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
77```
78
79## Software Issues
80
81### NKRO Doesn't work
82First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
83
84Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS.
85
86If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles.
87
88https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
89
90### Can't read column of matrix beyond 16
91Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
92
93In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`.
94
95http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
96
97
98### Bootloader jump doesn't work
99Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
100```
101# Size of Bootloaders in bytes:
102# Atmel DFU loader(ATmega32U4) 4096
103# Atmel DFU loader(AT90USB128) 8192
104# LUFA bootloader(ATmega32U4) 4096
105# Arduino Caterina(ATmega32U4) 4096
106# USBaspLoader(ATmega***) 2048
107# Teensy halfKay(ATmega32U4) 512
108# Teensy++ halfKay(AT90USB128) 2048
109OPT_DEFS += -DBOOTLOADER_SIZE=4096
110```
111AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
112Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
113
114AVR Boot section is located at end of Flash memory like the followings.
115```
116byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
1170x0000 +---------------+ 0x00000 +---------------+
118 | | | |
119 | | | |
120 | Application | | Application |
121 | | | |
122 = = = =
123 | | 32KB-4KB | | 128KB-8KB
1240x6000 +---------------+ 0x1E000 +---------------+
125 | Bootloader | 4KB | Bootloader | 8KB
1260x7FFF +---------------+ 0x1FFFF +---------------+
127
128
129byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
1300x0000 +---------------+ 0x00000 +---------------+
131 | | | |
132 | | | |
133 | Application | | Application |
134 | | | |
135 = = = =
136 | | 32KB-512B | | 128KB-2KB
1370x7E00 +---------------+ 0x1FC00 +---------------+
138 | Bootloader | 512B | Bootloader | 2KB
1390x7FFF +---------------+ 0x1FFFF +---------------+
140```
141
142And see this discussion for further reference.
143https://github.com/tmk/tmk_keyboard/issues/179
144
145
146### Special Extra key doesn't work(System, Audio control keys)
147You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
148
149```
150EXTRAKEY_ENABLE = yes # Audio control and System control
151```
152
153### Wakeup from sleep doesn't work
154
155In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
156
157Pressing any key during sleep should wake host.
158
159## Hardware Issues
160
161### TrackPoint needs reset circuit(PS/2 mouse support)
162Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
163
164- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
165- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
166
167### Using Arduino?
168
169**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
170
171- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
172- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
173
174Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
175
176### Using PF4-7 pins of USB AVR?
177You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this.
178
179If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
180
181See this code.
182```
183 // JTAG disable for PORT F. write JTD bit twice within four cycles.
184 MCUCR |= (1<<JTD);
185 MCUCR |= (1<<JTD);
186```
187https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
188
189And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
190
191
192### Program Arduino Micro/Leonardo
193Push reset button and then run command like this within 8 seconds.
194
195```
196avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
197```
198
199Device name will vary depending on your system.
200
201http://arduino.cc/en/Main/ArduinoBoardMicro
202https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
203
204### Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles
205Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
206
207As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
208
209https://github.com/tmk/tmk_keyboard/issues/266
210https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
211
212## Flashing Problems
213
214### Can't use dfu-programmer or QMK Flasher to flash on Windows
215
216Windows requires a driver to support the keyboard in DFU mode. You can use [QMK Driver Installer](https://github.com/qmk/qmk_driver_installer/releases) to install the necessary drivers.
diff --git a/docs/faq_debug.md b/docs/faq_debug.md
new file mode 100644
index 000000000..9e76ac409
--- /dev/null
+++ b/docs/faq_debug.md
@@ -0,0 +1,203 @@
1# Debugging FAQ
2
3This page details various common questions people have about troubleshooting their keyboards.
4
5# Debug Console
6
7## hid_listen can't recognize device
8When debug console of your device is not ready you will see like this:
9
10```
11Waiting for device:.........
12```
13
14once the device is pluged in then *hid_listen* finds it you will get this message:
15
16```
17Waiting for new device:.........................
18Listening:
19```
20
21If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile]
22
23You may need privilege to access the device on OS like Linux.
24- try `sudo hid_listen`
25
26## Can't get message on console
27Check:
28- *hid_listen* finds your device. See above.
29- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
30- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**.
31- try using 'print' function instead of debug print. See **common/print.h**.
32- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
33
34## Linux or UNIX like system requires Super User privilege
35Just use 'sudo' to execute *hid_listen* with privilege.
36```
37$ sudo hid_listen
38```
39
40Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
41
42File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
43```
44# tmk keyboard products https://github.com/tmk/tmk_keyboard
45SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
46```
47
48***
49
50# Miscellaneous
51## NKRO Doesn't work
52First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
53
54Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS.
55
56If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles.
57
58https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
59
60
61## TrackPoint needs reset circuit(PS/2 mouse support)
62Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
63
64- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
65- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
66
67
68## Can't read column of matrix beyond 16
69Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
70
71In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`.
72
73http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
74
75
76## Bootloader jump doesn't work
77Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
78```
79# Size of Bootloaders in bytes:
80# Atmel DFU loader(ATmega32U4) 4096
81# Atmel DFU loader(AT90USB128) 8192
82# LUFA bootloader(ATmega32U4) 4096
83# Arduino Caterina(ATmega32U4) 4096
84# USBaspLoader(ATmega***) 2048
85# Teensy halfKay(ATmega32U4) 512
86# Teensy++ halfKay(AT90USB128) 2048
87OPT_DEFS += -DBOOTLOADER_SIZE=4096
88```
89AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
90Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
91
92AVR Boot section is located at end of Flash memory like the followings.
93```
94byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
950x0000 +---------------+ 0x00000 +---------------+
96 | | | |
97 | | | |
98 | Application | | Application |
99 | | | |
100 = = = =
101 | | 32KB-4KB | | 128KB-8KB
1020x6000 +---------------+ 0x1E000 +---------------+
103 | Bootloader | 4KB | Bootloader | 8KB
1040x7FFF +---------------+ 0x1FFFF +---------------+
105
106
107byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
1080x0000 +---------------+ 0x00000 +---------------+
109 | | | |
110 | | | |
111 | Application | | Application |
112 | | | |
113 = = = =
114 | | 32KB-512B | | 128KB-2KB
1150x7E00 +---------------+ 0x1FC00 +---------------+
116 | Bootloader | 512B | Bootloader | 2KB
1170x7FFF +---------------+ 0x1FFFF +---------------+
118```
119
120And see this discussion for further reference.
121https://github.com/tmk/tmk_keyboard/issues/179
122
123
124## Special Extra key doesn't work(System, Audio control keys)
125You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
126
127```
128EXTRAKEY_ENABLE = yes # Audio control and System control
129```
130
131## Wakeup from sleep doesn't work
132
133In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
134
135Pressing any key during sleep should wake host.
136
137## Using Arduino?
138
139**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
140
141- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
142- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
143
144Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
145
146
147## Using PF4-7 pins of USB AVR?
148You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this.
149
150If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
151
152See this code.
153```
154 // JTAG disable for PORT F. write JTD bit twice within four cycles.
155 MCUCR |= (1<<JTD);
156 MCUCR |= (1<<JTD);
157```
158https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
159
160And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
161
162
163## Adding LED indicators of Lock keys
164You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
165
166http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
167
168## Program Arduino Micro/Leonardo
169Push reset button and then run command like this within 8 seconds.
170
171```
172avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
173```
174
175Device name will vary depending on your system.
176
177http://arduino.cc/en/Main/ArduinoBoardMicro
178https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
179
180
181## USB 3 compatibility
182I heard some people have a problem with USB 3 port, try USB 2 port.
183
184
185## Mac compatibility
186### OS X 10.11 and Hub
187https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
188
189
190## Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles
191Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
192
193As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
194
195https://github.com/tmk/tmk_keyboard/issues/266
196https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
197
198
199
200## FLIP doesn't work
201### AtLibUsbDfu.dll not found
202Remove current driver and reinstall one FLIP provides from DeviceManager.
203http://imgur.com/a/bnwzy
diff --git a/docs/faq_general.md b/docs/faq_general.md
new file mode 100644
index 000000000..efa564743
--- /dev/null
+++ b/docs/faq_general.md
@@ -0,0 +1,20 @@
1# Frequently Asked Questions
2
3## What is QMK?
4
5[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard).
6
7### Why the name Quantum?
8
9<!-- FIXME -->
10
11## What Differences Are There Between QMK and TMK?
12
13TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
14
15From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Quantum Keycodes](quantum_keycodes.html).
16
17From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follows the quality standards. These are mostly community maintained, but the QMK team also helps when necessary.
18
19Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
20
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index 0d24a7667..9f54f2213 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -1,4 +1,4 @@
1# Frequently Asked Keymap Questions 1# Keymap FAQ
2 2
3This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.html) first. 3This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.html) first.
4 4
diff --git a/docs/build_environment_setup.md b/docs/getting_started_build_tools.md
index d2d63defb..49ffdaf69 100644
--- a/docs/build_environment_setup.md
+++ b/docs/getting_started_build_tools.md
@@ -1,25 +1,77 @@
1# Build Environment Setup 1# Installing Build Tools
2 2
3This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.) 3This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.)
4 4
5<!-- FIXME: We should have ARM instructions somewhere. --> 5<!-- FIXME: We should have ARM instructions somewhere. -->
6 6
7# Windows 10 7## Linux
8 8
9## Creators Update 9To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
10
11You can also install things manually, but this documentation might not be always up to date with all requirements.
12
13The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently.
14
15```
16build-essential
17gcc
18unzip
19wget
20zip
21gcc-avr
22binutils-avr
23avr-libc
24dfu-programmer
25dfu-util
26gcc-arm-none-eabi
27binutils-arm-none-eabi
28libnewlib-arm-none-eabi
29git
30```
31
32Install the dependencies with your favorite package manager.
33
34Debian/Ubuntu example:
35
36 sudo apt-get update
37 sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
38
39# Mac
40If you're using [homebrew,](http://brew.sh/) you can use the following commands:
41
42 brew tap osx-cross/avr
43 brew install avr-libc
44 brew install dfu-programmer
45
46This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
47
48## Windows with msys2 (recommended)
49
50The best environment to use, for Windows Vista through any later version (tested on 7 and 10,) is [msys2](http://www.msys2.org).
51
52* Install msys2 by downloading and following the instructions here: http://www.msys2.org
53* Open the "MSYS2 MingGW 64-bit" shortcut
54* Navigate to your qmk checkout. For example, if it's in the root of your c drive:
55 * `$ cd /c/qmk_firmware`
56* Run `util/msys2_install.sh` and follow the prompts
57
58## Windows 10 (deprecated)
59These are the old instructions for Windows 10. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
60
61### Creators Update
10If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update). 62If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update).
11 63
12## Windows Subsystem for Linux 64### Windows Subsystem for Linux
13In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method. 65In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method.
14 66
15## Git 67### Git
16If you already have cloned the repository on your Windows file system you can ignore this section. 68If you already have cloned the repository on your Windows file system you can ignore this section.
17 69
18You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute. 70You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
19 71
20Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one. 72Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
21 73
22## Toolchain setup 74### Toolchain setup
23The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. 75The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
24 76
251. Open "Bash On Ubuntu On Windows" from the start menu. 771. Open "Bash On Ubuntu On Windows" from the start menu.
@@ -28,13 +80,16 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro
284. Close the Bash command window, and re-open it. 804. Close the Bash command window, and re-open it.
295. You are ready to compile and flash the firmware! 815. You are ready to compile and flash the firmware!
30 82
31## Some important things to keep in mind 83### Some important things to keep in mind
32* You can run `util/wsl_install.sh` again to get all the newest updates. 84* You can run `util/wsl_install.sh` again to get all the newest updates.
33* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it. 85* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it.
34* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations 86* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations
35* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work. 87* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work.
36 88
37# Windows (Vista and later) 89## Windows (Vista and later)
90
91These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
92
381. If you have ever installed WinAVR, uninstall it. 931. If you have ever installed WinAVR, uninstall it.
392. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 942. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
403. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). 953. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware).
@@ -46,58 +101,7 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro
46 101
47If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder. 102If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder.
48 103
49# Mac 104## Docker
50If you're using [homebrew,](http://brew.sh/) you can use the following commands:
51
52 brew tap osx-cross/avr
53 brew install avr-gcc
54 brew install dfu-programmer
55
56This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-gcc can take over 20 minutes and exhibit high CPU usage.
57
58You can also try these instructions:
59
601. Install Xcode from the App Store.
612. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
623. Install [DFU-Programmer](https://dfu-programmer.github.io/).
63
64If you are going to flash Infinity based keyboards you will also need dfu-util
65
66 brew install dfu-util
67
68# Linux
69
70To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
71
72You can also install things manually, but this documentation might not be always up to date with all requirements.
73
74The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently.
75
76```
77build-essential
78gcc
79unzip
80wget
81zip
82gcc-avr
83binutils-avr
84avr-libc
85dfu-programmer
86dfu-util
87gcc-arm-none-eabi
88binutils-arm-none-eabi
89libnewlib-arm-none-eabi
90git
91```
92
93Install the dependencies with your favorite package manager.
94
95Debian/Ubuntu example:
96
97 sudo apt-get update
98 sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
99
100# Docker
101 105
102If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap: 106If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
103 107
@@ -115,11 +119,5 @@ docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Use
115 119
116This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash. 120This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
117 121
118# Vagrant 122## Vagrant
119If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md). 123If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md).
120
121# Verify Your Installation
1221. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
1232. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
1243. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.
1254. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below.
diff --git a/docs/how_to_github.md b/docs/getting_started_github.md
index 387ddd91e..387ddd91e 100644
--- a/docs/how_to_github.md
+++ b/docs/getting_started_github.md
diff --git a/docs/getting_started_instroduction.md b/docs/getting_started_instroduction.md
new file mode 100644
index 000000000..3cd27504d
--- /dev/null
+++ b/docs/getting_started_instroduction.md
@@ -0,0 +1,47 @@
1# Introduction
2
3This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make.
4
5## Basic QMK structure
6
7QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
8
9### Keyboard project structure
10
11Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
12
13* `keymaps/`: Different keymaps that can be built
14* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
15* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
16
17### Keymap structure
18
19In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
20
21* `config.h`: the options to configure your keymap
22* `keymap.c`: all of your keymap code, required
23* `rules.mk`: the features of QMK that are enabled
24* `readme.md`: a description of your keymap, how others might use it, and explanations of features. Please upload images to a service like imgur.
25
26# The `config.h` file
27
28There are 2 `config.h` locations:
29
30* keyboard (`/keyboards/<keyboard>/config.h`)
31* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
32
33If the keymap `config.h` exists that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
34
35```
36#ifndef CONFIG_USER_H
37#define CONFIG_USER_H
38
39#include "../../config.h"
40```
41
42If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
43
44```c
45#undef MY_SETTING
46#define MY_SETTING 4
47```
diff --git a/docs/make_instructions.md b/docs/getting_started_make_guide.md
index 299c5785b..299c5785b 100644
--- a/docs/make_instructions.md
+++ b/docs/getting_started_make_guide.md
diff --git a/docs/vagrant_guide.md b/docs/getting_started_vagrant.md
index e6551cb25..e6551cb25 100644
--- a/docs/vagrant_guide.md
+++ b/docs/getting_started_vagrant.md
diff --git a/docs/qmk_overview.md b/docs/qmk_overview.md
deleted file mode 100644
index 6fdb68c49..000000000
--- a/docs/qmk_overview.md
+++ /dev/null
@@ -1,75 +0,0 @@
1# QMK Overview
2
3This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make.
4
5# Basic QMK structure
6
7QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
8
9## Keyboard project structure
10
11Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
12
13* `keymaps/`: Different keymaps that can be built
14* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
15* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
16
17### Keymap structure
18
19In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
20
21* `config.h`: the options to configure your keymap
22* `keymap.c`: all of your keymap code, required
23* `Makefile`: the features of QMK that are enabled, required to run `make` in your keymap folder
24* `readme.md`: a description of your keymap, how others might use it, and explanations of features
25* Other files: Some people choose to include an image depicting the layout, and other files that help people to use or understand a particular keymap.
26
27# The `make` command
28
29The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). It it recommended that you always run make from within the `root` folder.
30
31**NOTE:** To abort a make command press `Ctrl-c`
32
33For more details on the QMK build process see [Make Instructions](make_instructions.md).
34
35### Simple instructions for building and uploading a keyboard
36
37**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first**
38
391. Enter the `root` folder
402. Run `make <keyboard>-<subproject>-<keymap>-<programmer>`
41
42In the above commands, replace:
43
44* `<keyboard>` with the name of your keyboard
45* `<keymap>` with the name of your keymap
46* `<subproject>` with the name of the subproject (revision or sub-model of your keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
47 * If the keyboard doesn't have a subproject, or if you are happy with the default (defined in `rules.mk` file of the `keyboard` folder), you can leave it out. But remember to also remove the dash (`-`) from the command.
48* `<programmer>` The programmer to use. Most keyboards use `dfu`, but some use `teensy`. Infinity keyboards use `dfu-util`. Check the readme file in the keyboard folder to find out which programmer to use.
49 * If you don't add `-<programmer` to the command line, the firmware will be still be compiled into a hex file, but the upload will be skipped.
50
51**NOTE:** Some operating systems will refuse to program unless you run the make command as root for example `sudo make clueboard-default-dfu`
52
53## Make Examples
54
55* Build all Clueboard keymaps: `make clueboard`
56* Build the default Planck keymap: `make planck-rev4-default`
57* Build and flash your ergodox-ez: `make ergodox-ez-default-teensy`
58
59# The `config.h` file
60
61There are 2 `config.h` locations:
62
63* keyboard (`/keyboards/<keyboard>/`)
64* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
65
66The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this:
67
68```c
69#undef MY_SETTING
70#define MY_SETTING 4
71```
72
73For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it.
74
75You can then override any settings, rather than having to copy and paste the whole thing. \ No newline at end of file