diff options
author | Joel Spadin <joelspadin@gmail.com> | 2021-01-04 18:26:19 -0600 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2021-02-09 00:45:55 -0500 |
commit | 24ed1a8eaa013aa729f394554991507e95f3f99d (patch) | |
tree | 0e42a27458377fc6c31254282e0a57601f08a168 /docs | |
parent | 0955ffef65c1935b25028d84b512654a2ea67d66 (diff) |
docs(vscode): add more info for compile_commands.json path
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docs/development/ide-integration.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/docs/development/ide-integration.md b/docs/docs/development/ide-integration.md index 20ab692..7576af5 100644 --- a/docs/docs/development/ide-integration.md +++ b/docs/docs/development/ide-integration.md @@ -65,6 +65,8 @@ Change these options: | IntelliSense mode | gcc-arm | | Advanced Settings > Compiler commands | `${workspaceFolder}/app/build/compile_commands.json` | +#### Compiler Path + <OsTabs> <TabItem value="debian"> @@ -137,3 +139,21 @@ ${env:ZEPHYR_SDK_INSTALL_DIR}/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc </TabItem> </OsTabs> + +#### Compiler Commands Path + +When building with all default options, the path to the compilation database file +is `${workspaceFolder}/app/build/compile_commands.json` as shown in the table above, +however some arguments to `west build` can change this path. + +The `-d` or `--build-dir` option lets you change the build directory to something +other than `build`. Replace `build` in the above path with what you set this to. +For example, if you build with `-d build/my_shield`, the path is +`${workspaceFolder}/app/build/my_shield/compile_commands.json`. If you use this +to keep builds for multiple keyboards separate, you may want to create a separate +C/C++ configuration for each one in VS Code. + +You can also build from the root folder of the project instead of the `app` +folder by adding `-S app` to your CMake arguments. In this case, simply remove +`app` from the path to `compile_commands.json`, for example, +`${workspaceFolder}/build/compile_commands.json`. |