Add vscode build tasks for examples and release

This commit is contained in:
Christopher J. McClellan
2020-02-07 19:22:11 -05:00
parent 55bc69690a
commit ee3eca20d3
2 changed files with 39 additions and 3 deletions

4
.vscode/launch.json vendored
View File

@@ -12,7 +12,7 @@
"name": "Debug (QEMU)", "name": "Debug (QEMU)",
"servertype": "qemu", "servertype": "qemu",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"preLaunchTask": "build", "preLaunchTask": "cargo build",
"runToMain": true, "runToMain": true,
"executable": "./target/thumbv7m-none-eabi/debug/{{project-name}}", "executable": "./target/thumbv7m-none-eabi/debug/{{project-name}}",
/* Run `cargo build --example hello` and uncomment this line to run semi-hosting example */ /* Run `cargo build --example hello` and uncomment this line to run semi-hosting example */
@@ -27,7 +27,7 @@
"name": "Debug (OpenOCD)", "name": "Debug (OpenOCD)",
"servertype": "openocd", "servertype": "openocd",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"preLaunchTask": "build", "preLaunchTask": "cargo build",
"runToMain": true, "runToMain": true,
"executable": "./target/thumbv7em-none-eabihf/debug/{{project-name}}", "executable": "./target/thumbv7em-none-eabihf/debug/{{project-name}}",
/* Run `cargo build --example itm` and uncomment this line to run itm example */ /* 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, * but we need to provide a label for it,
* so we can invoke it from the debug launcher. * so we can invoke it from the debug launcher.
*/ */
"label": "build", "label": "cargo build",
"type": "cargo", "type": "cargo",
"subcommand": "build", "subcommand": "build",
"problemMatcher": [ "problemMatcher": [
@@ -20,5 +20,41 @@
"isDefault": true "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"
},
] ]
} }