From 13d1eb7241b8621267520e57811f8069b2e466e9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 7 May 2022 23:51:38 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20OpenOCD=20Debug=20for=20VSCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/PlatformIO/debugging/launch.json | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/buildroot/share/PlatformIO/debugging/launch.json b/buildroot/share/PlatformIO/debugging/launch.json index 335c4c663e..583d860eb3 100644 --- a/buildroot/share/PlatformIO/debugging/launch.json +++ b/buildroot/share/PlatformIO/debugging/launch.json @@ -12,26 +12,17 @@ "version": "0.2.0", "configurations": [ { - "name": "Debug STM32 (launch)", + "name": "Debug STM32 (ST-Link)", "request": "launch", "type": "cortex-debug", "servertype": "openocd", "cwd": "${workspaceRoot}", "showDevDebugOutput": false, "configFiles": [ "interface/stlink.cfg", "target/stm32f4x.cfg" ], - "device": "STM32F407", - "executable": ".pio/build/BIGTREE_SKR_2_USB_debug/firmware.elf", - }, - { - "name": "Debug STM32 (attach)", - "request": "attach", - "type": "cortex-debug", - "servertype": "openocd", - "cwd": "${workspaceRoot}", - "showDevDebugOutput": false, - "configFiles": [ "interface/stlink.cfg", "target/stm32f4x.cfg" ], - "device": "STM32F407", - "executable": ".pio/build/BIGTREE_SKR_2_USB_debug/firmware.elf", + "device": "stlink", + "executable": "${workspaceRoot}/.pio/build/BIGTREE_SKR_2_USB_debug/firmware.elf", + "openOCDLaunchCommands": [ "init", "reset init" ], + "svdFile": "${env:HOME}/.platformio/platforms/ststm32@12.1.1/misc/svd/STM32F40x.svd", }, { "name": "Debug Sim",