Browse Source

🔨 OpenOCD Debug for VSCode

Scott Lahteine 2 years ago
parent
commit
3bf768f925
1 changed files with 5 additions and 14 deletions
  1. 5
    14
      buildroot/share/PlatformIO/debugging/launch.json

+ 5
- 14
buildroot/share/PlatformIO/debugging/launch.json View File

@@ -12,26 +12,17 @@
12 12
     "version": "0.2.0",
13 13
     "configurations": [
14 14
         {
15
-            "name": "Debug STM32 (launch)",
15
+            "name": "Debug STM32 (ST-Link)",
16 16
             "request": "launch",
17 17
             "type": "cortex-debug",
18 18
             "servertype": "openocd",
19 19
             "cwd": "${workspaceRoot}",
20 20
             "showDevDebugOutput": false,
21 21
             "configFiles": [ "interface/stlink.cfg", "target/stm32f4x.cfg" ],
22
-            "device": "STM32F407",
23
-            "executable": ".pio/build/BIGTREE_SKR_2_USB_debug/firmware.elf",
24
-        },
25
-        {
26
-            "name": "Debug STM32 (attach)",
27
-            "request": "attach",
28
-            "type": "cortex-debug",
29
-            "servertype": "openocd",
30
-            "cwd": "${workspaceRoot}",
31
-            "showDevDebugOutput": false,
32
-            "configFiles": [ "interface/stlink.cfg", "target/stm32f4x.cfg" ],
33
-            "device": "STM32F407",
34
-            "executable": ".pio/build/BIGTREE_SKR_2_USB_debug/firmware.elf",
22
+            "device": "stlink",
23
+            "executable": "${workspaceRoot}/.pio/build/BIGTREE_SKR_2_USB_debug/firmware.elf",
24
+            "openOCDLaunchCommands": [ "init", "reset init" ],
25
+            "svdFile": "${env:HOME}/.platformio/platforms/ststm32@12.1.1/misc/svd/STM32F40x.svd",
35 26
         },
36 27
         {
37 28
             "name": "Debug Sim",

Loading…
Cancel
Save