aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorStefan Kerkmann <[email protected]>2024-09-01 19:54:53 +0200
committerGitHub <[email protected]>2024-09-01 19:54:53 +0200
commitd210590d4d8d859d1cd0960c0573391a9bf5d9a5 (patch)
tree1d83b79f397d44bb79a4bd2a27184e6c1f57ec46 /docs
parent07535aa2c0272072334a082e0e1bc5d911ec6b85 (diff)
downloadqmk_firmware-d210590d4d8d859d1cd0960c0573391a9bf5d9a5.tar.gz
qmk_firmware-d210590d4d8d859d1cd0960c0573391a9bf5d9a5.zip
[Maintenance] builddefs: common_rules: overhaul debug information generation (#24352)
builddefs: common_rules: overhaul debug information generation Debug information is always generated while compiling a binary, but debugging is not the main use-case for the majority of users. Thus the new default is to explicitly require them with `DEBUG_ENABLE=yes`. The same is true for linker map files which are gated by the same flag. As we target the gcc compiler and debug with the gdb debugger we can specify the ggdb3 flag in the most verbose to get macro expansion. Signed-off-by: Stefan Kerkmann <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/other_vscode.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/other_vscode.md b/docs/other_vscode.md
index 31208d8f3b..ab2b23e96b 100644
--- a/docs/other_vscode.md
+++ b/docs/other_vscode.md
@@ -177,12 +177,13 @@ You'll need to perform some modifications to the file above in order to target y
Windows builds of QMK Firmware are generally compiled using QMK MSYS, and the path to gdb's location (`C:\\QMK_MSYS\\mingw64\\bin`) needs to be specified under `armToolchainPath` for it to be detected. You may also need to change the GDB path to point at `C:\\QMK_MSYS\\mingw64\\bin\\gdb-multiarch.exe` in the VSCode Cortex-Debug user settings: ![VSCode Settings](https://i.imgur.com/EGrPM1L.png)
:::
-Optionally, the following modifications should also be made to the keyboard's `rules.mk` file to disable optimisations -- not strictly required but will ensure breakpoints and variable viewing works correctly:
+The following modifications must be made to the keyboard's `rules.mk` file to enable debug information and disable optimisations -- this will ensure breakpoints and variable viewing works correctly:
```makefile
+# Enable debug information in the final binaries
+DEBUG_ENABLE = yes
# Disable optimisations for debugging purposes
LTO_ENABLE = no
OPT = g
-DEBUG = 3
```
At this point, you should build and flash your firmware through normal methods (`qmk compile ...` and `qmk flash ...`).