Clean up todo format and clarify usage of dispatchers

This commit is contained in:
datdenkikniet
2023-05-01 14:43:16 +02:00
parent 43a6abed5e
commit 30bbca68e8
4 changed files with 17 additions and 10 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
defmt = { version = "0.3", features = ["encoding-rzcobs"] }
defmt-brtt = { version = "0.1", default-features = false, features = ["rtt"] }
panic-probe = { version = "0.3", features = ["print-defmt"] }
# TODO select the correct rtic backend
# TODO(4) Select the correct rtic backend
rtic = { version = "2.0.0-alpha.1", features = [ "$RTIC_BACKEND" ] }
# TODO enter your HAL here
# TODO(5) Add hal as dependency
# some-hal = "1.2.3"
# TODO add a monotonic if you use scheduling
# rtic-monotonics = { version = "1.0.0-alpha.2", features = [ "cortex-m-systick" ]}
+8 -5
View File
@@ -33,7 +33,7 @@ $ cargo install probe-run
$ git clone https://github.com/rtic-rs/app-template test-app
```
If you look into your new `test-app` folder, you'll find that there are a few `TODO`s in the files marking the properties you need to set.
If you look into your new `test-app` folder, you'll find that there are a few `TODO`s in the files marking the properties you need to set. The todo's are formatted as `TODO(n)`, where `n` is the number of the step in which the TODO is explained.
Let's walk through them together now.
@@ -78,8 +78,8 @@ In `Cargo.toml`, activate the correct `rtic` backend for your target by replacin
```diff
# Cargo.toml
-rtic = { version = "2.0.0-alhpa.1", features = [ "$RTIC_BACKEND" ] }
+rtic = { version = "2.0.0-alhpa.1", features = [ "thumbv7-backend" ] }
-rtic = { version = "2.0.0-alpha.1", features = [ "$RTIC_BACKEND" ] }
+rtic = { version = "2.0.0-alpha.1", features = [ "thumbv7-backend" ] }
```
#### 5. Add a HAL as a dependency
@@ -117,8 +117,11 @@ In `src/bin/minimal.rs`, edit the `rtic::app` macro into a valid form.
``` diff
\#[rtic::app(
- device = some_hal::pac, // TODO: Replace `some_hal::pac` with the path to the PAC
- dispatchers = [FreeInterrupt1, ...] // TODO: Replace the `FreeInterrupt1, ...` with free interrupt vectors if software tasks are used
- // TODO: Replace `some_hal::pac` with the path to the PAC
- device = some_hal::pac,
- // TODO: Replace the `FreeInterrupt1, ...` with free interrupt vectors if software tasks are used
- // You can usually find the names of the interrupt vectors in the some_hal::pac::interrupt enum.
- dispatchers = [FreeInterrupt1, ...]
+ device = nrf52840_hal::pac,
+ dispatchers = [SWI0_EGU0]
)]
+6 -2
View File
@@ -4,9 +4,13 @@
use test_app as _; // global logger + panicking-behavior + memory layout
// TODO(7) Configure the `rtic::app` macro
#[rtic::app(
device = some_hal::pac, // TODO: Replace `some_hal::pac` with the path to the PAC
dispatchers = [FreeInterrupt1, ...] // TODO: Replace the `FreeInterrupt1, ...` with free interrupt vectors if software tasks are used
// TODO: Replace `some_hal::pac` with the path to the PAC
device = some_hal::pac,
// TODO: Replace the `FreeInterrupt1, ...` with free interrupt vectors if software tasks are used
// You can usually find the names of the interrupt vectors in the some_hal::pac::interrupt enum.
dispatchers = [FreeInterrupt1, ...]
)]
mod app {
// Shared resources go here
+1 -1
View File
@@ -4,7 +4,7 @@
use core::sync::atomic::{AtomicUsize, Ordering};
use defmt_brtt as _; // global logger
// TODO adjust HAL import
// TODO(6) Import your HAL
// use some_hal as _; // memory layout
use panic_probe as _;