From 582c602912592ec7ebea3096aefa02aea99c2143 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 2 Jan 2023 14:34:05 +0100 Subject: Old xtask test pass --- examples/extern_binds.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'examples/extern_binds.rs') diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs index bfc85cf..4dc6633 100644 --- a/examples/extern_binds.rs +++ b/examples/extern_binds.rs @@ -2,7 +2,6 @@ #![deny(unsafe_code)] #![deny(warnings)] -#![deny(missing_docs)] #![no_main] #![no_std] @@ -11,7 +10,7 @@ use panic_semihosting as _; // Free function implementing the interrupt bound task `foo`. fn foo(_: app::foo::Context) { - hprintln!("foo called"); + hprintln!("foo called").ok(); } #[rtic::app(device = lm3s6965)] @@ -30,22 +29,21 @@ mod app { fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { rtic::pend(Interrupt::UART0); - hprintln!("init"); + hprintln!("init").unwrap(); (Shared {}, Local {}, init::Monotonics()) } #[idle] fn idle(_: idle::Context) -> ! { - hprintln!("idle"); + hprintln!("idle").unwrap(); rtic::pend(Interrupt::UART0); + debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator + loop { cortex_m::asm::nop(); - // Exit moved after nop to ensure that rtic::pend gets - // to run before exiting - debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator } } -- cgit v1.2.3 From 9a4f97ca5ebf19e6612115db5c763d0d61dd28a1 Mon Sep 17 00:00:00 2001 From: Per Lindgren Date: Sat, 7 Jan 2023 17:59:39 +0100 Subject: more examples --- examples/extern_binds.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/extern_binds.rs') diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs index 4dc6633..c9fc108 100644 --- a/examples/extern_binds.rs +++ b/examples/extern_binds.rs @@ -26,12 +26,12 @@ mod app { struct Local {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { + fn init(_: init::Context) -> (Shared, Local) { rtic::pend(Interrupt::UART0); hprintln!("init").unwrap(); - (Shared {}, Local {}, init::Monotonics()) + (Shared {}, Local {}) } #[idle] -- cgit v1.2.3 From ceaf3613d3256f60b139a4f93220e3c298603b83 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sun, 8 Jan 2023 19:40:31 +0100 Subject: Update semihosting --- examples/extern_binds.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/extern_binds.rs') diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs index c9fc108..23b99d5 100644 --- a/examples/extern_binds.rs +++ b/examples/extern_binds.rs @@ -10,7 +10,7 @@ use panic_semihosting as _; // Free function implementing the interrupt bound task `foo`. fn foo(_: app::foo::Context) { - hprintln!("foo called").ok(); + hprintln!("foo called"); } #[rtic::app(device = lm3s6965)] @@ -29,14 +29,14 @@ mod app { fn init(_: init::Context) -> (Shared, Local) { rtic::pend(Interrupt::UART0); - hprintln!("init").unwrap(); + hprintln!("init"); (Shared {}, Local {}) } #[idle] fn idle(_: idle::Context) -> ! { - hprintln!("idle").unwrap(); + hprintln!("idle"); rtic::pend(Interrupt::UART0); -- cgit v1.2.3 From 35c97b61c17a30de675eb1c7f852a100b200a0c2 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sun, 8 Jan 2023 19:56:47 +0100 Subject: All examples pass with `cargo xtask --target all` --- examples/extern_binds.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/extern_binds.rs') diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs index 23b99d5..b24e7a1 100644 --- a/examples/extern_binds.rs +++ b/examples/extern_binds.rs @@ -40,10 +40,9 @@ mod app { rtic::pend(Interrupt::UART0); - debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator - loop { cortex_m::asm::nop(); + debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator } } -- cgit v1.2.3 From b8b881f446a226d6f3c4a7db7c9174590b47dbf6 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Thu, 19 Jan 2023 13:56:59 +0100 Subject: Fix so deny(missing_docs) work --- examples/extern_binds.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/extern_binds.rs') diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs index b24e7a1..142a11d 100644 --- a/examples/extern_binds.rs +++ b/examples/extern_binds.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] -- cgit v1.2.3 From 306aa47170fd59369b7a184924e287dc3706d64d Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 23 Jan 2023 20:05:47 +0100 Subject: Add rtic-timer (timerqueue + monotonic) and rtic-monotonics (systick-monotonic) --- examples/extern_binds.rs | 54 ------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 examples/extern_binds.rs (limited to 'examples/extern_binds.rs') diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs deleted file mode 100644 index 142a11d..0000000 --- a/examples/extern_binds.rs +++ /dev/null @@ -1,54 +0,0 @@ -//! examples/extern_binds.rs - -#![deny(unsafe_code)] -#![deny(warnings)] -#![deny(missing_docs)] -#![no_main] -#![no_std] - -use cortex_m_semihosting::hprintln; -use panic_semihosting as _; - -// Free function implementing the interrupt bound task `foo`. -fn foo(_: app::foo::Context) { - hprintln!("foo called"); -} - -#[rtic::app(device = lm3s6965)] -mod app { - use crate::foo; - use cortex_m_semihosting::{debug, hprintln}; - use lm3s6965::Interrupt; - - #[shared] - struct Shared {} - - #[local] - struct Local {} - - #[init] - fn init(_: init::Context) -> (Shared, Local) { - rtic::pend(Interrupt::UART0); - - hprintln!("init"); - - (Shared {}, Local {}) - } - - #[idle] - fn idle(_: idle::Context) -> ! { - hprintln!("idle"); - - rtic::pend(Interrupt::UART0); - - loop { - cortex_m::asm::nop(); - debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator - } - } - - extern "Rust" { - #[task(binds = UART0)] - fn foo(_: foo::Context); - } -} -- cgit v1.2.3