diff --git a/va416xx-hal/src/uart.rs b/va416xx-hal/src/uart.rs index c2b9abf..bd2f9c8 100644 --- a/va416xx-hal/src/uart.rs +++ b/va416xx-hal/src/uart.rs @@ -7,6 +7,7 @@ //! ## Examples //! //! - [UART simple example](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/examples/simple/examples/uart.rs) +//! - [UART echo with IRQ and Embassy](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/examples/embassy/src/bin/uart-echo-with-irq.rs) //! - [Flashloader app using UART with IRQs](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/flashloader) use core::ops::Deref; diff --git a/vscode/launch.json b/vscode/launch.json index 0a41f77..d942236 100644 --- a/vscode/launch.json +++ b/vscode/launch.json @@ -350,6 +350,36 @@ ] } }, + { + "type": "cortex-debug", + "request": "launch", + "name": "UART Echo with IRQ", + "servertype": "jlink", + "jlinkscript": "${workspaceFolder}/jlink/JLinkSettings.JLinkScript", + "cwd": "${workspaceRoot}", + "device": "Cortex-M4", + "svdFile": "${workspaceFolder}/va416xx/svd/va416xx.svd.patched", + "preLaunchTask": "uart-echo-with-irq", + "overrideLaunchCommands": [ + "monitor halt", + "monitor reset", + "load", + ], + "executable": "${workspaceFolder}/target/thumbv7em-none-eabihf/debug/uart-echo-with-irq", + "interface": "swd", + "runToEntryPoint": "main", + "rttConfig": { + "enabled": true, + "address": "auto", + "decoders": [ + { + "port": 0, + "timestamp": true, + "type": "console" + } + ] + } + }, { "type": "cortex-debug", "request": "launch", diff --git a/vscode/tasks.json b/vscode/tasks.json index 4bc6c05..d20cc8f 100644 --- a/vscode/tasks.json +++ b/vscode/tasks.json @@ -95,6 +95,19 @@ "kind": "build", } }, + { + "label": "uart-echo-with-irq", + "type": "shell", + "command": "~/.cargo/bin/cargo", // note: full path to the cargo + "args": [ + "build", + "--bin", + "uart-echo-with-irq" + ], + "group": { + "kind": "build", + } + }, { "label": "pwm-example", "type": "shell", @@ -200,4 +213,4 @@ } }, ] -} +} \ No newline at end of file