Skip to content

Commit

Permalink
Upgrade rtfm-demo to RTIC as well as dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckeogh committed Jul 20, 2020
1 parent ed8bf7f commit af2d9ac
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "rtfm-demo"
name = "rtic-demo"
version = "0.1.0"
authors = ["James Munns <[email protected]>"]
edition = "2018"
publish = false

[dependencies]
cortex-m-rtfm = "0.4.3"
panic-semihosting = "0.5.1"
cortex-m-semihosting = "0.3.3"
cortex-m-rtic = "0.5.3"
panic-semihosting = "0.5.3"
cortex-m-semihosting = "0.3.5"

[dependencies.nrf51-hal]
path = "../../nrf51-hal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
#[allow(unused_imports)]
use panic_semihosting;

use core::sync::atomic::{compiler_fence, Ordering};
use cortex_m_semihosting::{debug, hprintln};
use rtfm::app;
use rtic::app;

#[cfg(feature = "51")]
use nrf51_hal as hal;
Expand All @@ -22,16 +23,18 @@ use nrf52840_hal as hal;
#[app(device = crate::hal::pac)]
const APP: () = {
#[init]
fn init() {
fn init(_: init::Context) {
hprintln!("init").unwrap();
}

#[idle]
fn idle() -> ! {
fn idle(_: idle::Context) -> ! {
hprintln!("idle").unwrap();

debug::exit(debug::EXIT_SUCCESS);

loop {}
loop {
continue;
}
}
};
16 changes: 8 additions & 8 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ cargo build --manifest-path nrf52833-hal/Cargo.toml
echo Building nrf52840-hal...
cargo build --manifest-path nrf52840-hal/Cargo.toml

echo Building examples/rtfm-demo...
cargo build --manifest-path examples/rtfm-demo/Cargo.toml
echo Building examples/rtfm-demo...
cargo build --manifest-path examples/rtfm-demo/Cargo.toml --no-default-features --features="51" --target thumbv6m-none-eabi
echo Building examples/rtfm-demo...
cargo build --manifest-path examples/rtfm-demo/Cargo.toml --no-default-features --features="52810" --target thumbv7em-none-eabi
echo Building examples/rtfm-demo...
cargo build --manifest-path examples/rtfm-demo/Cargo.toml --no-default-features --features="52840"
echo Building examples/rtic-demo...
cargo build --manifest-path examples/rtic-demo/Cargo.toml
echo Building examples/rtic-demo...
cargo build --manifest-path examples/rtic-demo/Cargo.toml --no-default-features --features="51" --target thumbv6m-none-eabi
echo Building examples/rtic-demo...
cargo build --manifest-path examples/rtic-demo/Cargo.toml --no-default-features --features="52810" --target thumbv7em-none-eabi
echo Building examples/rtic-demo...
cargo build --manifest-path examples/rtic-demo/Cargo.toml --no-default-features --features="52840"
echo Building examples/spi-demo...
cargo build --manifest-path examples/spi-demo/Cargo.toml
echo Building examples/twi-ssd1306...
Expand Down

0 comments on commit af2d9ac

Please sign in to comment.