aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/README.md6
-rw-r--r--docs/adding_a_keyboard_to_qmk.md2
-rw-r--r--docs/config_options.md18
-rw-r--r--docs/contributing.md6
-rw-r--r--docs/documentation_templates.md2
-rw-r--r--docs/faq_build.md2
-rw-r--r--docs/feature_layouts.md15
-rw-r--r--docs/getting_started_build_tools.md4
-rw-r--r--docs/getting_started_make_guide.md27
-rw-r--r--docs/hand_wire.md2
-rw-r--r--docs/unit_testing.md2
11 files changed, 40 insertions, 46 deletions
diff --git a/docs/README.md b/docs/README.md
index 515ddb778..065263edb 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -14,11 +14,11 @@ Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk
14 14
15Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation: 15Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation:
16 16
17 make planck-rev4-default 17 make planck/rev4:default
18 18
19This would build the `rev4` revision of the `planck` with the `default` keymap. Not all keyboards have revisions (also called subprojects), in which case, it can be omitted: 19This would build the `rev4` revision of the `planck` with the `default` keymap. Not all keyboards have revisions (also called subprojects or folders), in which case, it can be omitted:
20 20
21 make preonic-default 21 make preonic:default
22 22
23## How to customize {#how-to-customize} 23## How to customize {#how-to-customize}
24 24
diff --git a/docs/adding_a_keyboard_to_qmk.md b/docs/adding_a_keyboard_to_qmk.md
index c8b76c1b9..5ee2c8cca 100644
--- a/docs/adding_a_keyboard_to_qmk.md
+++ b/docs/adding_a_keyboard_to_qmk.md
@@ -4,7 +4,7 @@ We welcome all keyboard projects into QMK, but ask that you try to stick to a co
4 4
5## Naming your directory/project 5## Naming your directory/project
6 6
7All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Dashes (`-`) aren't allow by our build system, and will confuse it with keymaps/subprojects. Your directory and your `.h` and `.c` files should have exactly the same name. Subprojects/revision should follow the same format. 7All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format.
8 8
9## `readme.md` 9## `readme.md`
10 10
diff --git a/docs/config_options.md b/docs/config_options.md
index 13c8bdbbe..b71dbb8ae 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -12,29 +12,25 @@ This is a c header file that is one of the first things included, and will persi
12 12
13// config options 13// config options
14 14
15#ifdef SUBPROJECT_<subproject>
16 #include "<subproject>/config.h"
17#endif
18
19#endif 15#endif
20``` 16```
21 17
22This file contains config options that should apply to the whole keyboard, and won't change in subprojects, or most keymaps. The suproject block here only applies to keyboards with subprojects. 18This file contains config options that should apply to the whole keyboard, and won't change in revisions, or most keymaps. The revision block here only applies to keyboards with revisions.
23 19
24## Subproject 20## Revisions
25 21
26```c 22```c
27#ifndef <subproject>_CONFIG_H 23#ifndef <revision>_CONFIG_H
28#define <subproject>_CONFIG_H 24#define <revision>_CONFIG_H
29 25
30#include "../config.h" 26#include "config_common.h"
31 27
32// config options 28// config options
33 29
34#endif 30#endif
35``` 31```
36 32
37For keyboards that have subprojects, this file contains config options that should apply to only that subproject, and won't change in most keymaps. 33For keyboards that have revisions, this file contains config options that should apply to only that revisions, and won't change in most keymaps.
38 34
39## Keymap 35## Keymap
40 36
@@ -42,7 +38,7 @@ For keyboards that have subprojects, this file contains config options that shou
42#ifndef CONFIG_USER_H 38#ifndef CONFIG_USER_H
43#define CONFIG_USER_H 39#define CONFIG_USER_H
44 40
45#include "../../config.h" 41#include "config_common.h"
46 42
47// config options 43// config options
48 44
diff --git a/docs/contributing.md b/docs/contributing.md
index b675f98b3..755dd012f 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -78,8 +78,8 @@ We have a few different types of changes in QMK, each requiring a different leve
78* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature. 78* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
79* Check for unnecessary whitespace with `git diff --check` before committing. 79* Check for unnecessary whitespace with `git diff --check` before committing.
80* Make sure your code change actually compiles. 80* Make sure your code change actually compiles.
81 * Keymaps: Make sure that `make keyboard-revision-your_new_keymap` does not return an error 81 * Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error
82 * Keyboards: Make sure that `make keyboard-all` does not return any errors 82 * Keyboards: Make sure that `make keyboard:all` does not return any errors
83 * Core: Make sure that `make allkb` does not return any errors. 83 * Core: Make sure that `make allkb` does not return any errors.
84* Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. Example: 84* Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. Example:
85 85
@@ -128,7 +128,7 @@ Here are some things to keep in mind when working on your feature or bug fix.
128 128
129* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it. 129* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it.
130* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back. 130* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back.
131* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on. 131* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
132* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work. 132* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.
133 133
134We also ask that you follow these guidelines: 134We also ask that you follow these guidelines:
diff --git a/docs/documentation_templates.md b/docs/documentation_templates.md
index 856a131a6..18829ed0f 100644
--- a/docs/documentation_templates.md
+++ b/docs/documentation_templates.md
@@ -34,7 +34,7 @@ Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.mass
34 34
35Make example for this keyboard (after setting up your build environment): 35Make example for this keyboard (after setting up your build environment):
36 36
37 make planck-rev4-default 37 make planck/rev4:default
38 38
39See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. 39See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
40``` 40```
diff --git a/docs/faq_build.md b/docs/faq_build.md
index fe3aeeef6..3d732fa98 100644
--- a/docs/faq_build.md
+++ b/docs/faq_build.md
@@ -13,7 +13,7 @@ In short when your controller is ATMega32u4,
13 13
14or just 14or just
15 15
16 $ sudo make <keyboard>-<keymap>-dfu 16 $ sudo make <keyboard>:<keymap>:dfu
17 17
18But to run `make` with root privilege is not good idea. Use former method if possible. 18But to run `make` with root privilege is not good idea. Use former method if possible.
19 19
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md
index 4d75270dc..5763b7380 100644
--- a/docs/feature_layouts.md
+++ b/docs/feature_layouts.md
@@ -43,15 +43,15 @@ The folder name must be added to the keyboard's `rules.mk`:
43 43
44 LAYOUTS = 60_ansi 44 LAYOUTS = 60_ansi
45 45
46`LAYOUTS` can be appended in the subproject's `rules.mk`: 46`LAYOUTS` can be set in any keyboard folder level's `rules.mk`:
47 47
48 LAYOUTS += 60_iso 48 LAYOUTS = 60_iso
49 49
50but the `LAYOUT_<layout>` variable must be defined in `<subproject>.h` as well. 50but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
51 51
52## Tips for making layouts keyboard-agnostic 52## Tips for making layouts keyboard-agnostic
53 53
54Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<subproject>.h` should not be included here) file that is being compiled: 54Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled:
55 55
56 #include QMK_KEYBOARD_H 56 #include QMK_KEYBOARD_H
57 57
@@ -61,17 +61,16 @@ In your config.h, you can also use this variable to include the keyboard's `conf
61 61
62If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement: 62If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement:
63 63
64* `KEYBOARD_<keyboard>` 64* `KEYBOARD_<folder1>_<folder2>`
65* `SUBPROJECT_<subproject>`
66 65
67For example: 66For example:
68 67
69```c 68```c
70#ifdef KEYBOARD_planck 69#ifdef KEYBOARD_planck
71 #ifdef SUBPROJECT_rev4 70 #ifdef KEYBOARD_planck_rev4
72 planck_rev4_function(); 71 planck_rev4_function();
73 #endif 72 #endif
74#endif 73#endif
75``` 74```
76 75
77Note that the names are lowercase and match the folder/file names for the keyboard/subproject exactly. \ No newline at end of file 76Note that the names are lowercase and match the folder/file names for the keyboard/revision exactly. \ No newline at end of file
diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md
index 0617252b2..934617d85 100644
--- a/docs/getting_started_build_tools.md
+++ b/docs/getting_started_build_tools.md
@@ -121,10 +121,10 @@ If this is a bit complex for you, Docker might be the turn-key solution you need
121# modify the keymap and keyboard assigment to compile what you want 121# modify the keymap and keyboard assigment to compile what you want
122# defaults are ergodox/default 122# defaults are ergodox/default
123 123
124docker run -e keymap=gwen -e subproject=ez -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware 124docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
125 125
126# On windows docker seems to have issue with VOLUME tag in Dockerfile, and $('pwd') won't print a windows compliant path, use full path instead like this 126# On windows docker seems to have issue with VOLUME tag in Dockerfile, and $('pwd') won't print a windows compliant path, use full path instead like this
127docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware 127docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
128 128
129``` 129```
130 130
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md
index 97383d950..b6f0f4ee2 100644
--- a/docs/getting_started_make_guide.md
+++ b/docs/getting_started_make_guide.md
@@ -1,22 +1,21 @@
1# More detailed make instruction 1# More detailed make instruction
2 2
3The full syntax of the `make` command is `<keyboard>-<subproject>-<keymap>-<target>`, where: 3The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`, where:
4 4
5* `<keyboard>` is the name of the keyboard, for example `planck` 5* `<keyboard_folder>` is the path of the keyboard, for example `planck`
6 * Use `allkb` to compile all keyboards 6 * Use `all` to compile all keyboards
7* `<subproject>` is the name of the subproject (revision or sub-model of the keyboard). For example, for Planck it can be `rev3` or `rev4`. 7 * Specify the path to compile a revision, for example `planck/rev4` or `planck/rev3`
8 * If the keyboard doesn't have any subprojects, it can be left out 8 * If the keyboard doesn't have any folders, it can be left out
9 * To compile the default subproject, you can leave it out, or specify `defaultsp` 9 * To compile the default folder, you can leave it out
10 * Use `allsp` to compile all subprojects
11* `<keymap>` is the name of the keymap, for example `algernon` 10* `<keymap>` is the name of the keymap, for example `algernon`
12 * Use `allkm` to compile all keymaps 11 * Use `all` to compile all keymaps
13* `<target>` will be explained in more detail below. 12* `<target>` will be explained in more detail below.
14 13
15The `<target>` means the following 14The `<target>` means the following
16* If no target is given, then it's the same as `all` below 15* If no target is given, then it's the same as `all` below
17* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck-rev4-default-all` will generate a single .hex, while `make planck-rev-all` will generate a hex for every keymap available to the planck. 16* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default:all` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
18* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. 17* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
19 * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck-rev4-default-dfu`. 18 * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
20* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems. 19* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
21 20
22You can also add extra options at the end of the make command line, after the target 21You can also add extra options at the end of the make command line, after the target
@@ -30,9 +29,9 @@ The make command itself also has some additional options, type `make --help` for
30 29
31Here are some examples commands 30Here are some examples commands
32 31
33* `make allkb-allsp-allkm` builds everything (all keyboards, all subprojects, all keymaps). Running just `make` from the `root` will also run this. 32* `make all:all` builds everything (all keyboard folders, all keymaps). Running just `make` from the `root` will also run this.
34* `make ergodox-infinity-algernon-clean` will clean the build output of the Ergodox Infinity keyboard. 33* `make ergodox_infinity:algernon:clean` will clean the build output of the Ergodox Infinity keyboard.
35* `make planck-rev4-default-dfu COLOR=false` builds and uploads the keymap without color output. 34* `make planck/rev4:default:dfu COLOR=false` builds and uploads the keymap without color output.
36 35
37## `rules.mk` options 36## `rules.mk` options
38 37
diff --git a/docs/hand_wire.md b/docs/hand_wire.md
index 8f329daf8..b5a565714 100644
--- a/docs/hand_wire.md
+++ b/docs/hand_wire.md
@@ -273,7 +273,7 @@ Notice how the `k11` and `KC_NO` switched places to represent the wiring, and th
273 273
274### keymaps/<variant>/default.c 274### keymaps/<variant>/default.c
275 275
276This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make handwired-<keyboard>-<variant>`, which will pull `keymaps/<variant>/keymap.c`. 276This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make handwired/<keyboard>:<variant>`, which will pull `keymaps/<variant>/keymap.c`.
277 277
278The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer. 278The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer.
279 279
diff --git a/docs/unit_testing.md b/docs/unit_testing.md
index 3eac62509..81cfef79e 100644
--- a/docs/unit_testing.md
+++ b/docs/unit_testing.md
@@ -36,7 +36,7 @@ Note how there's several different tests, each mocking out a separate part. Also
36 36
37## Running the tests 37## Running the tests
38 38
39To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test-matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer. 39To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
40 40
41## Debugging the tests 41## Debugging the tests
42 42