aboutsummaryrefslogtreecommitdiff
path: root/docs/cli.md
diff options
context:
space:
mode:
authorCody Bender <50554676+cfbender@users.noreply.github.com>2020-02-07 13:48:37 -0700
committerGitHub <noreply@github.com>2020-02-07 21:48:37 +0100
commite77188458f136da3e25ce066e80b21d38f6e8cdc (patch)
tree1066504f2e5a1a27b068ce6383f75ede0e9c21de /docs/cli.md
parent774cbbf879eaec2149413917cb970054e4c1bf59 (diff)
downloadqmk_firmware-e77188458f136da3e25ce066e80b21d38f6e8cdc.tar.gz
qmk_firmware-e77188458f136da3e25ce066e80b21d38f6e8cdc.zip
Add QMK Compile Context Sensitivity (#6884)
* Add context sensitive compile, without config check * Initial full working state. Plan to refactor * Refactor loop for simplicity, add comments * Update docs/cli.md with qmk compile examples * Simplify path for keyboard derivation * Update path to use path.join instead of concat * Refactor keyboard path, the skully way * Add in keymap folder support * Add /layouts compile support * Update docs/cli.md with empty compile in layouts * Add comments to compile.py * Update docs for clarity, and fix compile error typo * Fix config option compile * Fix layout compile and failure mode * Add rules.mk check * Fix variable names for global config * Add in_layout priority * Remove default fallback in favor of throw, update docs * Add keymap folder context * Fix formatting * Add os import * Convert to create_make_command * Fix Travis lint errors * Remove blank line with whitespace * Add blank lines for readability * Remove unnecessary config logic * Update Docs to add flash Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com> * Shift config precedence to MILC Co-authored-by: skullydazed <skullydazed@users.noreply.github.com>
Diffstat (limited to 'docs/cli.md')
-rw-r--r--docs/cli.md49
1 files changed, 48 insertions, 1 deletions
diff --git a/docs/cli.md b/docs/cli.md
index 4f328a75a..f1c158af4 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -81,7 +81,7 @@ qmk cformat [file1] [file2] [...] [fileN]
81 81
82## `qmk compile` 82## `qmk compile`
83 83
84This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo. 84This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
85 85
86**Usage for Configurator Exports**: 86**Usage for Configurator Exports**:
87 87
@@ -95,6 +95,53 @@ qmk compile <configuratorExport.json>
95qmk compile -kb <keyboard_name> -km <keymap_name> 95qmk compile -kb <keyboard_name> -km <keymap_name>
96``` 96```
97 97
98**Usage in Keyboard Directory**:
99
100Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
101```
102qmk compile
103```
104
105**Example**:
106```
107$ qmk config compile.keymap=default
108$ cd ~/qmk_firmware/keyboards/planck/rev6
109$ qmk compile
110Ψ Compiling keymap with make planck/rev6:default
111...
112```
113or with optional keymap argument
114
115```
116$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
117$ qmk compile -km 66_iso
118Ψ Compiling keymap with make clueboard/66/rev4:66_iso
119...
120```
121or in keymap directory
122
123```
124$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
125$ qmk compile
126Ψ Compiling keymap with make make gh60/satan:colemak
127...
128```
129
130**Usage in Layout Directory**:
131
132Must be under `qmk_firmware/layouts/`, and in a keymap folder.
133```
134qmk compile -kb <keyboard_name>
135```
136
137**Example**:
138```
139$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
140$ qmk compile -kb dz60
141Ψ Compiling keymap with make dz60:mechmerlin-ansi
142...
143```
144
98## `qmk flash` 145## `qmk flash`
99 146
100This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. 147This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default.