Skip to content

Commit af2d9ac

Browse files
committed
Upgrade rtfm-demo to RTIC as well as dependencies
1 parent ed8bf7f commit af2d9ac

5 files changed

Lines changed: 19 additions & 16 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
2-
name = "rtfm-demo"
2+
name = "rtic-demo"
33
version = "0.1.0"
44
authors = ["James Munns <james.munns@ferrous-systems.com>"]
55
edition = "2018"
66
publish = false
77

88
[dependencies]
9-
cortex-m-rtfm = "0.4.3"
10-
panic-semihosting = "0.5.1"
11-
cortex-m-semihosting = "0.3.3"
9+
cortex-m-rtic = "0.5.3"
10+
panic-semihosting = "0.5.3"
11+
cortex-m-semihosting = "0.3.5"
1212

1313
[dependencies.nrf51-hal]
1414
path = "../../nrf51-hal"
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
#[allow(unused_imports)]
55
use panic_semihosting;
66

7+
use core::sync::atomic::{compiler_fence, Ordering};
78
use cortex_m_semihosting::{debug, hprintln};
8-
use rtfm::app;
9+
use rtic::app;
910

1011
#[cfg(feature = "51")]
1112
use nrf51_hal as hal;
@@ -22,16 +23,18 @@ use nrf52840_hal as hal;
2223
#[app(device = crate::hal::pac)]
2324
const APP: () = {
2425
#[init]
25-
fn init() {
26+
fn init(_: init::Context) {
2627
hprintln!("init").unwrap();
2728
}
2829

2930
#[idle]
30-
fn idle() -> ! {
31+
fn idle(_: idle::Context) -> ! {
3132
hprintln!("idle").unwrap();
3233

3334
debug::exit(debug::EXIT_SUCCESS);
3435

35-
loop {}
36+
loop {
37+
continue;
38+
}
3639
}
3740
};

scripts/build.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ cargo build --manifest-path nrf52833-hal/Cargo.toml
1818
echo Building nrf52840-hal...
1919
cargo build --manifest-path nrf52840-hal/Cargo.toml
2020

21-
echo Building examples/rtfm-demo...
22-
cargo build --manifest-path examples/rtfm-demo/Cargo.toml
23-
echo Building examples/rtfm-demo...
24-
cargo build --manifest-path examples/rtfm-demo/Cargo.toml --no-default-features --features="51" --target thumbv6m-none-eabi
25-
echo Building examples/rtfm-demo...
26-
cargo build --manifest-path examples/rtfm-demo/Cargo.toml --no-default-features --features="52810" --target thumbv7em-none-eabi
27-
echo Building examples/rtfm-demo...
28-
cargo build --manifest-path examples/rtfm-demo/Cargo.toml --no-default-features --features="52840"
21+
echo Building examples/rtic-demo...
22+
cargo build --manifest-path examples/rtic-demo/Cargo.toml
23+
echo Building examples/rtic-demo...
24+
cargo build --manifest-path examples/rtic-demo/Cargo.toml --no-default-features --features="51" --target thumbv6m-none-eabi
25+
echo Building examples/rtic-demo...
26+
cargo build --manifest-path examples/rtic-demo/Cargo.toml --no-default-features --features="52810" --target thumbv7em-none-eabi
27+
echo Building examples/rtic-demo...
28+
cargo build --manifest-path examples/rtic-demo/Cargo.toml --no-default-features --features="52840"
2929
echo Building examples/spi-demo...
3030
cargo build --manifest-path examples/spi-demo/Cargo.toml
3131
echo Building examples/twi-ssd1306...

0 commit comments

Comments
 (0)