From 52221b0bb79b241dd4db3e2cba85d84bb521af70 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 1 Mar 2022 09:47:22 -0500 Subject: [PATCH] vscode: add stlink debug config (#19269) Co-authored-by: Jacob Crabill --- platforms/nuttx/Debug/launch.json.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/platforms/nuttx/Debug/launch.json.in b/platforms/nuttx/Debug/launch.json.in index 1f2b03cd83..eff3e90744 100644 --- a/platforms/nuttx/Debug/launch.json.in +++ b/platforms/nuttx/Debug/launch.json.in @@ -21,6 +21,24 @@ "set print pretty", ] }, + { + "name": "stlink (@PX4_BOARD@)", + "device": "@DEBUG_DEVICE@", + "svdFile": "@DEBUG_SVD_FILE_PATH@", + "executable": "${command:cmake.launchTargetPath}", + "request": "launch", + "type": "cortex-debug", + "servertype": "stutil", + "cwd": "${workspaceFolder}", + "internalConsoleOptions": "openOnSessionStart", + "preLaunchCommands": [ + "source ${workspaceFolder}/platforms/nuttx/Debug/PX4", + "source ${workspaceFolder}/platforms/nuttx/Debug/NuttX", + "source ${workspaceFolder}/platforms/nuttx/Debug/ARMv7M", + "set mem inaccessible-by-default off", + "set print pretty", + ] + }, { "name": "blackmagic (@PX4_BOARD@)", "device": "@DEBUG_DEVICE@",