Clean up todo format and clarify usage of dispatchers
This commit is contained in:
+2
-2
@@ -9,9 +9,9 @@ cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
|||||||
defmt = { version = "0.3", features = ["encoding-rzcobs"] }
|
defmt = { version = "0.3", features = ["encoding-rzcobs"] }
|
||||||
defmt-brtt = { version = "0.1", default-features = false, features = ["rtt"] }
|
defmt-brtt = { version = "0.1", default-features = false, features = ["rtt"] }
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
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" ] }
|
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"
|
# some-hal = "1.2.3"
|
||||||
# TODO add a monotonic if you use scheduling
|
# TODO add a monotonic if you use scheduling
|
||||||
# rtic-monotonics = { version = "1.0.0-alpha.2", features = [ "cortex-m-systick" ]}
|
# rtic-monotonics = { version = "1.0.0-alpha.2", features = [ "cortex-m-systick" ]}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ $ cargo install probe-run
|
|||||||
$ git clone https://github.com/rtic-rs/app-template test-app
|
$ 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.
|
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
|
```diff
|
||||||
# Cargo.toml
|
# Cargo.toml
|
||||||
-rtic = { version = "2.0.0-alhpa.1", features = [ "$RTIC_BACKEND" ] }
|
-rtic = { version = "2.0.0-alpha.1", features = [ "$RTIC_BACKEND" ] }
|
||||||
+rtic = { version = "2.0.0-alhpa.1", features = [ "thumbv7-backend" ] }
|
+rtic = { version = "2.0.0-alpha.1", features = [ "thumbv7-backend" ] }
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 5. Add a HAL as a dependency
|
#### 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
|
``` diff
|
||||||
\#[rtic::app(
|
\#[rtic::app(
|
||||||
- device = some_hal::pac, // TODO: Replace `some_hal::pac` with the path to the 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
|
- 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,
|
+ device = nrf52840_hal::pac,
|
||||||
+ dispatchers = [SWI0_EGU0]
|
+ dispatchers = [SWI0_EGU0]
|
||||||
)]
|
)]
|
||||||
|
|||||||
+6
-2
@@ -4,9 +4,13 @@
|
|||||||
|
|
||||||
use test_app as _; // global logger + panicking-behavior + memory layout
|
use test_app as _; // global logger + panicking-behavior + memory layout
|
||||||
|
|
||||||
|
// TODO(7) Configure the `rtic::app` macro
|
||||||
#[rtic::app(
|
#[rtic::app(
|
||||||
device = some_hal::pac, // TODO: Replace `some_hal::pac` with the path to the 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
|
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 {
|
mod app {
|
||||||
// Shared resources go here
|
// Shared resources go here
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||||
use defmt_brtt as _; // global logger
|
use defmt_brtt as _; // global logger
|
||||||
|
|
||||||
// TODO adjust HAL import
|
// TODO(6) Import your HAL
|
||||||
// use some_hal as _; // memory layout
|
// use some_hal as _; // memory layout
|
||||||
use panic_probe as _;
|
use panic_probe as _;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user