From 55bc69690a86de41b2986449b425794bf7c24499 Mon Sep 17 00:00:00 2001 From: "Christopher J. McClellan" Date: Wed, 1 Jan 2020 08:02:15 -0500 Subject: [PATCH 1/2] Add recommended extensions file --- .gitignore | 3 ++- .vscode/extensions.json | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .vscode/extensions.json diff --git a/.gitignore b/.gitignore index cc4a880..fa5b635 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ target/ !.vscode/*.md !.vscode/*.svd !.vscode/launch.json -!.vscode/tasks.json \ No newline at end of file +!.vscode/tasks.json +!.vscode/extensions.json \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..5a6574b --- /dev/null +++ b/.vscode/extensions.json @@ -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": [ + + ] +} \ No newline at end of file From ee3eca20d3dc071d8588888cdc6c9f41f7546387 Mon Sep 17 00:00:00 2001 From: "Christopher J. McClellan" Date: Fri, 7 Feb 2020 19:22:11 -0500 Subject: [PATCH 2/2] Add vscode build tasks for examples and release --- .vscode/launch.json | 4 ++-- .vscode/tasks.json | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d38b321..b554e31 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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 */ diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1331bc0..b427041 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -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" + }, ] } \ No newline at end of file