From f37f39d79df62ad5667c8a2300cc5b88df4f1ccf Mon Sep 17 00:00:00 2001 From: ErNis <4658853+erstec@users.noreply.github.com> Date: Sun, 3 Apr 2022 22:05:07 +0300 Subject: [PATCH] Update Windows 11 - VS Code - WSL2 - Hardware Debugging.md --- .../Windows 11 - VS Code - WSL2 - Hardware Debugging.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/development/Windows 11 - VS Code - WSL2 - Hardware Debugging.md b/docs/development/Windows 11 - VS Code - WSL2 - Hardware Debugging.md index 75a762bff1..1f3a129c4f 100644 --- a/docs/development/Windows 11 - VS Code - WSL2 - Hardware Debugging.md +++ b/docs/development/Windows 11 - VS Code - WSL2 - Hardware Debugging.md @@ -92,7 +92,13 @@ sudo udevadm control --reload-rules ## Debugging - Connect SWD from ST-Link to FC board (at least GND, SWDIO and SWCLK should be connected, but connecting Vref to +3.3V pad and RESET accordingly will improve debugging stability a lot!) - Power FC (can be powered from USB) -- Use VS Code Run -> Start Debugging (F5) menu +- Select (Debug) CMake configuration +- Build required target from VSCode +- Use VS Code Run -> Start Debugging (F5) menu (make sure debugging target is "Cortex Debug") + +**NOTE:** sometimes "autobuild" script is not performed well, it is recommended to repeat last two steps every time you change code and need "reflash-debug" + +**NOTE:** after long and/or intensive debugging OpenOCD can crash, in this case just reopen VSCode, replug ST-Link USB, reattach USB to WSL and start debug session again # Troubleshooting - OpenOCD shows Permission denied during "Flashing":