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