Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for debugging ARM with VSCode+BMP. #11217

Merged
merged 7 commits into from
Mar 8, 2024
Merged
Prev Previous commit
Next Next commit
Merge branch 'master' into vscode+black-magic-probe
  • Loading branch information
drashna authored Nov 27, 2023
commit 7caa141b6e6363116eea0f1c1e79226cf586e927
12 changes: 12 additions & 0 deletions docs/other_vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ Restart once you've installed any extensions.
2. Open the QMK Firmware folder that you cloned from GitHub.
3. Click <kbd><kbd>File</kbd> > <kbd>Save Workspace As...</kbd></kbd>

## Configuring VS Code

Using the [standard `compile_commands.json` database](https://clang.llvm.org/docs/JSONCompilationDatabase.html), we can get the VS code _clangd_ extension to use the correct includes and defines used for your keyboard and keymap.

1. Run `qmk generate-compilation-database -kb <keyboard> -km <keymap>` to generate the `compile_commands.json`.
1. Inside VS code, press <kbd><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd></kbd> (macOS: <kbd><kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd></kbd>) to open the command palette.
1. Start typing `clangd: Download Language Server` and select it when it appears. Note that this only needs to be done once on clangd extension installation, if it didn't already ask to do so.
1. Inside VS code, press <kbd><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd></kbd> (macOS: <kbd><kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd></kbd>) to open the command palette.
1. Start typing `clangd: Restart Language Server` and select it when it appears.

Now you're ready to code QMK Firmware in VS Code!

And now you're ready to code QMK Firmware in VS Code!

# Debugging ARM MCUs with Visual Studio Code
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.