Use a task file for the beginner apps.

Lets you set the DEFMT_LOG env variable more easily even with VS Code is auto-building the code.
This commit is contained in:
Jonathan Pallant (Ferrous Systems) 2023-01-26 18:52:11 +00:00
parent 2a1379db5e
commit edbf34cf00
2 changed files with 29 additions and 2 deletions

View file

@ -7,9 +7,9 @@
"executable": "./target/thumbv7em-none-eabihf/debug/hello",
"name": "Debug Microcontroller (launch)",
"request": "launch",
"preLaunchTask": "rust: cargo build",
"preLaunchTask": "Build Rust (Debug)",
"type": "cortex-debug",
"runToMain": true,
"runToEntryPoint": "main",
"configFiles": [
"interface/jlink.cfg",
],

27
beginner/apps/.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,27 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Rust (Debug)",
"type": "shell",
"command": "cargo build",
"options": {
"env": {
"DEFMT_LOG": "debug",
}
}
},
{
"label": "Build Rust (Warn)",
"type": "shell",
"command": "cargo build",
"options": {
"env": {
"DEFMT_LOG": "warn",
}
}
}
]
}