From b2d69e6d53f92cc06087d1885a5020fa7da8d190 Mon Sep 17 00:00:00 2001 From: 97gushan <97gustavh@gmail.com> Date: Wed, 5 Feb 2020 10:54:53 +0100 Subject: [PATCH] add debug for examples in launch.json --- .vscode/launch.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 4904bcb..a47fdba 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,7 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + // Launch configuration for `app` // - debug // - semihosting @@ -24,6 +25,27 @@ ], "runToMain": true, "cwd": "${workspaceRoot}" + }, + // Launch configuration for `app` + // - debug + // - semihosting + // - run to main + { + "type": "cortex-debug", + "request": "launch", + "servertype": "openocd", + "name": "examples (debug)", + "preLaunchTask": "cargo build --examples", + "executable": "./target/thumbv7em-none-eabihf/debug/examples/${fileBasenameNoExtension}", + "configFiles": [ + "interface/stlink-v2-1.cfg", + "target/stm32f4x.cfg" + ], + "postLaunchCommands": [ + "monitor arm semihosting enable" + ], + "runToMain": true, + "cwd": "${workspaceRoot}" }, // Launch configuration for `examples` // - debug -- GitLab