Merge pull request #82 from rubberduck203/vscode

VS Code build tasks
This commit is contained in:
Adam Greig
2020-02-27 22:03:30 +00:00
committed by GitHub
4 changed files with 55 additions and 4 deletions

1
.gitignore vendored
View File

@@ -10,3 +10,4 @@ target/
!.vscode/*.svd
!.vscode/launch.json
!.vscode/tasks.json
!.vscode/extensions.json

14
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,14 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"rust-lang.rust",
"marus25.cortex-debug",
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [
]
}

4
.vscode/launch.json vendored
View File

@@ -12,7 +12,7 @@
"name": "Debug (QEMU)",
"servertype": "qemu",
"cwd": "${workspaceRoot}",
"preLaunchTask": "build",
"preLaunchTask": "cargo build",
"runToMain": true,
"executable": "./target/thumbv7m-none-eabi/debug/{{project-name}}",
/* Run `cargo build --example hello` and uncomment this line to run semi-hosting example */
@@ -27,7 +27,7 @@
"name": "Debug (OpenOCD)",
"servertype": "openocd",
"cwd": "${workspaceRoot}",
"preLaunchTask": "build",
"preLaunchTask": "cargo build",
"runToMain": true,
"executable": "./target/thumbv7em-none-eabihf/debug/{{project-name}}",
/* Run `cargo build --example itm` and uncomment this line to run itm example */

38
.vscode/tasks.json vendored
View File

@@ -9,7 +9,7 @@
* but we need to provide a label for it,
* so we can invoke it from the debug launcher.
*/
"label": "build",
"label": "cargo build",
"type": "cargo",
"subcommand": "build",
"problemMatcher": [
@@ -20,5 +20,41 @@
"isDefault": true
}
},
{
"label": "cargo build --release",
"type": "process",
"command": "cargo",
"args": ["build", "--release"],
"problemMatcher": [
"$rustc"
],
"group": "build"
},
{
"label": "cargo build --examples",
"type": "process",
"command": "cargo",
"args": ["build","--examples"],
"problemMatcher": [
"$rustc"
],
"group": "build"
},
{
"label": "cargo build --examples --release",
"type": "process",
"command": "cargo",
"args": ["build","--examples", "--release"],
"problemMatcher": [
"$rustc"
],
"group": "build"
},
{
"label": "cargo clean",
"type": "cargo",
"subcommand": "clean",
"group": "build"
},
]
}