aboutsummaryrefslogtreecommitdiff
path: root/docs/cli_commands.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/cli_commands.md')
-rw-r--r--docs/cli_commands.md58
1 files changed, 30 insertions, 28 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md
index d17b0eda23..c6a7ffe191 100644
--- a/docs/cli_commands.md
+++ b/docs/cli_commands.md
@@ -17,7 +17,7 @@ qmk compile [-c] <configuratorExport.json>
**Usage for Keymaps**:
```
-qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] -kb <keyboard_name> -km <keymap_name>
+qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] [--compiledb] -kb <keyboard_name> -km <keymap_name>
```
**Usage in Keyboard Directory**:
@@ -84,6 +84,25 @@ The `num_jobs` argument determines the maximum number of jobs that can be used.
qmk compile -j 0 -kb <keyboard_name>
```
+**Compilation Database**:
+
+Creates a `compile_commands.json` file.
+
+Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! Compiling using this argument can create this for you.
+
+**Example:**
+
+```
+$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
+$ qmk compile --compiledb
+Ψ Making clean
+Ψ Gathering build instructions from make ........
+Ψ Found 63 compile commands
+Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json
+Ψ Compiling keymap with make ........
+... build log continues ...
+```
+
## `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. To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing) guide for more details of the available bootloaders.
@@ -694,33 +713,6 @@ qmk format-c
qmk format-c -b branch_name
```
-## `qmk generate-compilation-database`
-
-**Usage**:
-
-```
-qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]
-```
-
-Creates a `compile_commands.json` file.
-
-Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! The qmk tool can build this for you.
-
-This command needs to know which keyboard and keymap to build. It uses the same configuration options as the `qmk compile` command: arguments, current directory, and config files.
-
-**Example:**
-
-```
-$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
-$ qmk generate-compilation-database
-Ψ Making clean
-Ψ Gathering build instructions from make -n gh60/satan:colemak
-Ψ Found 50 compile commands
-Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json
-```
-
-Now open your dev environment and live a squiggly-free life.
-
## `qmk docs`
This command starts a local HTTP server which you can use for browsing or improving the docs, and provides live reload capability whilst editing. Default port is 8936.
@@ -885,3 +877,13 @@ Run single test:
```
qmk test-c --test basic
```
+
+## `qmk generate-compilation-database`
+
+**Usage**:
+
+```
+qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]
+```
+
+This command has been deprecated as it cannot take into account configurables such as [converters](/feature_converters) or environment variables normally specified on the command line; please use the `--compiledb` flag with `qmk compile` instead.