diff --git a/Cargo.toml b/Cargo.toml index d813729..d3c6724 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" ]} diff --git a/README.md b/README.md index e70ef25..dffff68 100644 --- a/README.md +++ b/README.md @@ -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] )] diff --git a/src/bin/minimal.rs b/src/bin/minimal.rs index 6ca39b0..0b9075f 100644 --- a/src/bin/minimal.rs +++ b/src/bin/minimal.rs @@ -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 diff --git a/src/lib.rs b/src/lib.rs index ac69537..a7e24e0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 _;