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>
This commit is contained in:
parent
774cbbf879
commit
e77188458f
2 changed files with 120 additions and 4 deletions
49
docs/cli.md
49
docs/cli.md
|
@ -81,7 +81,7 @@ qmk cformat [file1] [file2] [...] [fileN]
|
|||
|
||||
## `qmk compile`
|
||||
|
||||
This 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.
|
||||
This 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.
|
||||
|
||||
**Usage for Configurator Exports**:
|
||||
|
||||
|
@ -95,6 +95,53 @@ qmk compile <configuratorExport.json>
|
|||
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||
```
|
||||
|
||||
**Usage in Keyboard Directory**:
|
||||
|
||||
Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
|
||||
```
|
||||
qmk compile
|
||||
```
|
||||
|
||||
**Example**:
|
||||
```
|
||||
$ qmk config compile.keymap=default
|
||||
$ cd ~/qmk_firmware/keyboards/planck/rev6
|
||||
$ qmk compile
|
||||
Ψ Compiling keymap with make planck/rev6:default
|
||||
...
|
||||
```
|
||||
or with optional keymap argument
|
||||
|
||||
```
|
||||
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
|
||||
$ qmk compile -km 66_iso
|
||||
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
|
||||
...
|
||||
```
|
||||
or in keymap directory
|
||||
|
||||
```
|
||||
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
|
||||
$ qmk compile
|
||||
Ψ Compiling keymap with make make gh60/satan:colemak
|
||||
...
|
||||
```
|
||||
|
||||
**Usage in Layout Directory**:
|
||||
|
||||
Must be under `qmk_firmware/layouts/`, and in a keymap folder.
|
||||
```
|
||||
qmk compile -kb <keyboard_name>
|
||||
```
|
||||
|
||||
**Example**:
|
||||
```
|
||||
$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
|
||||
$ qmk compile -kb dz60
|
||||
Ψ Compiling keymap with make dz60:mechmerlin-ansi
|
||||
...
|
||||
```
|
||||
|
||||
## `qmk flash`
|
||||
|
||||
This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue