Skip to content

Commit ee3eca2

Browse files
committed
Add vscode build tasks for examples and release
1 parent 55bc696 commit ee3eca2

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

Diff for: .vscode/launch.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"name": "Debug (QEMU)",
1313
"servertype": "qemu",
1414
"cwd": "${workspaceRoot}",
15-
"preLaunchTask": "build",
15+
"preLaunchTask": "cargo build",
1616
"runToMain": true,
1717
"executable": "./target/thumbv7m-none-eabi/debug/{{project-name}}",
1818
/* Run `cargo build --example hello` and uncomment this line to run semi-hosting example */
@@ -27,7 +27,7 @@
2727
"name": "Debug (OpenOCD)",
2828
"servertype": "openocd",
2929
"cwd": "${workspaceRoot}",
30-
"preLaunchTask": "build",
30+
"preLaunchTask": "cargo build",
3131
"runToMain": true,
3232
"executable": "./target/thumbv7em-none-eabihf/debug/{{project-name}}",
3333
/* Run `cargo build --example itm` and uncomment this line to run itm example */

Diff for: .vscode/tasks.json

+37-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* but we need to provide a label for it,
1010
* so we can invoke it from the debug launcher.
1111
*/
12-
"label": "build",
12+
"label": "cargo build",
1313
"type": "cargo",
1414
"subcommand": "build",
1515
"problemMatcher": [
@@ -20,5 +20,41 @@
2020
"isDefault": true
2121
}
2222
},
23+
{
24+
"label": "cargo build --release",
25+
"type": "process",
26+
"command": "cargo",
27+
"args": ["build", "--release"],
28+
"problemMatcher": [
29+
"$rustc"
30+
],
31+
"group": "build"
32+
},
33+
{
34+
"label": "cargo build --examples",
35+
"type": "process",
36+
"command": "cargo",
37+
"args": ["build","--examples"],
38+
"problemMatcher": [
39+
"$rustc"
40+
],
41+
"group": "build"
42+
},
43+
{
44+
"label": "cargo build --examples --release",
45+
"type": "process",
46+
"command": "cargo",
47+
"args": ["build","--examples", "--release"],
48+
"problemMatcher": [
49+
"$rustc"
50+
],
51+
"group": "build"
52+
},
53+
{
54+
"label": "cargo clean",
55+
"type": "cargo",
56+
"subcommand": "clean",
57+
"group": "build"
58+
},
2359
]
2460
}

0 commit comments

Comments
 (0)