Skip to content

Commit cda24a6

Browse files
authored
Merge pull request #82 from rubberduck203/vscode
VS Code build tasks
2 parents e702592 + ee3eca2 commit cda24a6

File tree

4 files changed

+55
-4
lines changed

4 files changed

+55
-4
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ target/
99
!.vscode/*.md
1010
!.vscode/*.svd
1111
!.vscode/launch.json
12-
!.vscode/tasks.json
12+
!.vscode/tasks.json
13+
!.vscode/extensions.json

.vscode/extensions.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
5+
// List of extensions which should be recommended for users of this workspace.
6+
"recommendations": [
7+
"rust-lang.rust",
8+
"marus25.cortex-debug",
9+
],
10+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
11+
"unwantedRecommendations": [
12+
13+
]
14+
}

.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 */

.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)