update VS Code files

This commit is contained in:
Robin Müller 2024-06-12 10:30:22 +02:00
parent 5179a79225
commit 622c0573f7
Signed by: muellerr
GPG Key ID: A649FB78196E3849
5 changed files with 33 additions and 64 deletions

View File

@ -1,26 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "cortex-debug",
"request": "launch",
"name": "Debug LED Blinky",
// The user should start the J-Link server themselves for now. This is because the
// Cortex-Debug will issue a reset command, which is problematic even with
// a valid JLinkScript file
"servertype": "external",
"gdbTarget": "localhost:2331",
"gdbPath": "/usr/bin/gdb-multiarch",
"cwd": "${workspaceRoot}",
"device": "Cortex-M4",
"svdFile": "../va416xx/svd/va416xx-base.svd",
"preLaunchTask": "rust: cargo build led blinky",
"executable": "${workspaceFolder}/target/thumbv7em-none-eabihf/debug/examples/blinky",
"interface": "swd",
"runToMain": true,
},
]
}

View File

@ -1,19 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "rust: cargo build led blinky",
"type": "shell",
"command": "~/.cargo/bin/cargo", // note: full path to the cargo
"args": [
"build", "--example", "blinky"
],
"group": {
"kind": "build",
"isDefault": true
}
},
]
}

View File

@ -3,7 +3,7 @@
#![no_std] #![no_std]
use cortex_m_rt::entry; use cortex_m_rt::entry;
use embedded_hal::digital::StatefulOutputPin; use embedded_hal::digital::{OutputPin, StatefulOutputPin};
use panic_halt as _; use panic_halt as _;
use va416xx_hal::{gpio::PinsG, pac}; use va416xx_hal::{gpio::PinsG, pac};
@ -19,7 +19,9 @@ fn main() -> ! {
let mut led = portg.pg5.into_readable_push_pull_output(); let mut led = portg.pg5.into_readable_push_pull_output();
//let mut delay = CountDownTimer::new(&mut dp.SYSCONFIG, 50.mhz(), dp.TIM0); //let mut delay = CountDownTimer::new(&mut dp.SYSCONFIG, 50.mhz(), dp.TIM0);
loop { loop {
led.toggle().ok(); led.set_high().ok();
cortex_m::asm::delay(2_000_000);
led.set_low().ok();
cortex_m::asm::delay(2_000_000); cortex_m::asm::delay(2_000_000);
} }
} }

View File

@ -15,11 +15,11 @@
"gdbTarget": "localhost:2331", "gdbTarget": "localhost:2331",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"device": "Cortex-M4", "device": "Cortex-M4",
"svdFile": "${workspaceFolder}/va416xx/svd/va416xx-base.svd", "svdFile": "${workspaceFolder}/va416xx/svd/va416xx.svd.patched",
"preLaunchTask": "rust: cargo build led blinky pac", "preLaunchTask": "blinky-pac-example",
"executable": "${workspaceFolder}/target/thumbv7em-none-eabihf/debug/examples/blinky-pac", "executable": "${workspaceFolder}/target/thumbv7em-none-eabihf/debug/examples/blinky-pac",
"interface": "swd", "interface": "swd",
"runToMain": true, "runToEntryPoint": "main",
}, },
{ {
"type": "cortex-debug", "type": "cortex-debug",
@ -29,11 +29,11 @@
"gdbTarget": "localhost:2331", "gdbTarget": "localhost:2331",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"device": "Cortex-M4", "device": "Cortex-M4",
"svdFile": "${workspaceFolder}/va416xx/svd/va416xx-base.svd", "svdFile": "${workspaceFolder}/va416xx/svd/va416xx.svd.patched",
"preLaunchTask": "rust: cargo build led blinky", "preLaunchTask": "blinky-example",
"executable": "${workspaceFolder}/target/thumbv7em-none-eabihf/debug/examples/blinky", "executable": "${workspaceFolder}/target/thumbv7em-none-eabihf/debug/examples/blinky",
"interface": "swd", "interface": "swd",
"runToMain": true, "runToEntryPoint": "main",
}, },
{ {
"type": "cortex-debug", "type": "cortex-debug",
@ -43,11 +43,11 @@
"gdbTarget": "localhost:2331", "gdbTarget": "localhost:2331",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"device": "Cortex-M4", "device": "Cortex-M4",
"svdFile": "${workspaceFolder}/va416xx/svd/va416xx-base.svd", "svdFile": "${workspaceFolder}/va416xx/svd/va416xx.svd.patched",
"preLaunchTask": "rust: cargo build rtt", "preLaunchTask": "rtt-log-example",
"executable": "${workspaceFolder}/target/thumbv7em-none-eabihf/debug/examples/rtt-log", "executable": "${workspaceFolder}/target/thumbv7em-none-eabihf/debug/examples/rtt-log",
"interface": "swd", "interface": "swd",
"runToMain": true, "runToEntryPoint": "main",
}, },
] ]
} }

View File

@ -4,11 +4,15 @@
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "rust: cargo build led blinky pac", "label": "blinky-pac-example",
"type": "shell", "type": "shell",
"command": "~/.cargo/bin/cargo", // note: full path to the cargo "command": "~/.cargo/bin/cargo", // note: full path to the cargo
"args": [ "args": [
"build", "-p", "va416xx-hal", "--example", "blinky-pac" "build",
"-p",
"va416xx-hal",
"--example",
"blinky-pac"
], ],
"group": { "group": {
"kind": "build", "kind": "build",
@ -16,11 +20,15 @@
} }
}, },
{ {
"label": "rust: cargo build rtt", "label": "rtt-log-example",
"type": "shell", "type": "shell",
"command": "~/.cargo/bin/cargo", // note: full path to the cargo "command": "~/.cargo/bin/cargo", // note: full path to the cargo
"args": [ "args": [
"build", "-p", "va416xx-hal", "--example", "rtt-log" "build",
"-p",
"va416xx-hal",
"--example",
"rtt-log"
], ],
"group": { "group": {
"kind": "build", "kind": "build",
@ -28,11 +36,15 @@
} }
}, },
{ {
"label": "rust: cargo build led blinky", "label": "blinky-example",
"type": "shell", "type": "shell",
"command": "~/.cargo/bin/cargo", // note: full path to the cargo "command": "~/.cargo/bin/cargo", // note: full path to the cargo
"args": [ "args": [
"build", "-p", "vorago-hal", "--example", "blinky" "build",
"-p",
"va416xx-hal",
"--example",
"blinky"
], ],
"group": { "group": {
"kind": "build", "kind": "build",