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 --- ui/extern-interrupt-not-enough.stderr | 4 ++-- ui/task-priority-too-high.rs | 2 +- ui/task-priority-too-high.stderr | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/extern-interrupt-not-enough.stderr b/ui/extern-interrupt-not-enough.stderr index a667c58..d8c01b9 100644 --- a/ui/extern-interrupt-not-enough.stderr +++ b/ui/extern-interrupt-not-enough.stderr @@ -1,5 +1,5 @@ -error: not enough interrupts to dispatch all software tasks (need: 1; given: 0) - --> $DIR/extern-interrupt-not-enough.rs:17:8 +error: not enough interrupts to dispatch all software and async tasks (need: 1; given: 0) - one interrupt is needed per priority and sync/async task + --> ui/extern-interrupt-not-enough.rs:17:8 | 17 | fn a(_: a::Context) {} | ^ diff --git a/ui/task-priority-too-high.rs b/ui/task-priority-too-high.rs index e7e0cce..46ab561 100644 --- a/ui/task-priority-too-high.rs +++ b/ui/task-priority-too-high.rs @@ -9,7 +9,7 @@ mod app { struct Local {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { + fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { (Shared {}, Local {}, init::Monotonics()) } diff --git a/ui/task-priority-too-high.stderr b/ui/task-priority-too-high.stderr index 026124c..a7a15eb 100644 --- a/ui/task-priority-too-high.stderr +++ b/ui/task-priority-too-high.stderr @@ -1,3 +1,11 @@ +warning: unused variable: `cx` + --> ui/task-priority-too-high.rs:12:13 + | +12 | fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { + | ^^ help: if this is intentional, prefix it with an underscore: `_cx` + | + = note: `#[warn(unused_variables)]` on by default + error[E0080]: evaluation of constant value failed --> ui/task-priority-too-high.rs:3:1 | -- cgit v1.2.3 From 9829d0ac07180967208403610bc9a25249b9fe85 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 2 Jan 2023 14:58:37 +0100 Subject: Add check again --- ui/extern-interrupt-not-enough.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/extern-interrupt-not-enough.stderr b/ui/extern-interrupt-not-enough.stderr index d8c01b9..6f28b7a 100644 --- a/ui/extern-interrupt-not-enough.stderr +++ b/ui/extern-interrupt-not-enough.stderr @@ -1,4 +1,4 @@ -error: not enough interrupts to dispatch all software and async tasks (need: 1; given: 0) - one interrupt is needed per priority and sync/async task +error: not enough interrupts to dispatch all software tasks (need: 1; given: 0) --> ui/extern-interrupt-not-enough.rs:17:8 | 17 | fn a(_: a::Context) {} -- cgit v1.2.3 From 95e494968053a17ac05a0c1cec9d8b2c7d450296 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sun, 8 Jan 2023 21:33:44 +0100 Subject: Start CI, disable docs building --- ui/exception-invalid.rs | 4 ++-- ui/extern-interrupt-not-enough.rs | 6 +++--- ui/extern-interrupt-not-enough.stderr | 6 +++--- ui/extern-interrupt-used.rs | 4 ++-- ui/task-priority-too-high.rs | 4 ++-- ui/task-priority-too-high.stderr | 2 +- ui/unknown-interrupt.rs | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'ui') diff --git a/ui/exception-invalid.rs b/ui/exception-invalid.rs index 07d3c21..4f8e943 100644 --- a/ui/exception-invalid.rs +++ b/ui/exception-invalid.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[init] - fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics()) + fn init(cx: init::Context) -> (Shared, Local) { + (Shared {}, Local {}) } #[task(binds = NonMaskableInt)] diff --git a/ui/extern-interrupt-not-enough.rs b/ui/extern-interrupt-not-enough.rs index 1dbe923..94c8ee1 100644 --- a/ui/extern-interrupt-not-enough.rs +++ b/ui/extern-interrupt-not-enough.rs @@ -9,10 +9,10 @@ mod app { struct Local {} #[init] - fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics()) + fn init(cx: init::Context) -> (Shared, Local) { + (Shared {}, Local {}) } #[task] - fn a(_: a::Context) {} + async fn a(_: a::Context) {} } diff --git a/ui/extern-interrupt-not-enough.stderr b/ui/extern-interrupt-not-enough.stderr index 6f28b7a..e6c01b9 100644 --- a/ui/extern-interrupt-not-enough.stderr +++ b/ui/extern-interrupt-not-enough.stderr @@ -1,5 +1,5 @@ error: not enough interrupts to dispatch all software tasks (need: 1; given: 0) - --> ui/extern-interrupt-not-enough.rs:17:8 + --> ui/extern-interrupt-not-enough.rs:17:14 | -17 | fn a(_: a::Context) {} - | ^ +17 | async fn a(_: a::Context) {} + | ^ diff --git a/ui/extern-interrupt-used.rs b/ui/extern-interrupt-used.rs index 882d5e3..42de4c0 100644 --- a/ui/extern-interrupt-used.rs +++ b/ui/extern-interrupt-used.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[init] - fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics()) + fn init(cx: init::Context) -> (Shared, Local) { + (Shared {}, Local {}) } #[task(binds = UART0)] diff --git a/ui/task-priority-too-high.rs b/ui/task-priority-too-high.rs index 46ab561..44e4a25 100644 --- a/ui/task-priority-too-high.rs +++ b/ui/task-priority-too-high.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[init] - fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics()) + fn init(cx: init::Context) -> (Shared, Local) { + (Shared {}, Local {}) } #[task(binds = GPIOA, priority = 1)] diff --git a/ui/task-priority-too-high.stderr b/ui/task-priority-too-high.stderr index a7a15eb..1256377 100644 --- a/ui/task-priority-too-high.stderr +++ b/ui/task-priority-too-high.stderr @@ -1,7 +1,7 @@ warning: unused variable: `cx` --> ui/task-priority-too-high.rs:12:13 | -12 | fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { +12 | fn init(cx: init::Context) -> (Shared, Local) { | ^^ help: if this is intentional, prefix it with an underscore: `_cx` | = note: `#[warn(unused_variables)]` on by default diff --git a/ui/unknown-interrupt.rs b/ui/unknown-interrupt.rs index f2bc629..3c6c69f 100644 --- a/ui/unknown-interrupt.rs +++ b/ui/unknown-interrupt.rs @@ -9,7 +9,7 @@ mod app { struct Local {} #[init] - fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics()) + fn init(cx: init::Context) -> (Shared, Local) { + (Shared {}, Local {}) } } -- 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) --- ui/exception-invalid.rs | 18 ------------ ui/exception-invalid.stderr | 5 ---- ui/extern-interrupt-not-enough.rs | 18 ------------ ui/extern-interrupt-not-enough.stderr | 5 ---- ui/extern-interrupt-used.rs | 18 ------------ ui/extern-interrupt-used.stderr | 5 ---- ui/task-priority-too-high.rs | 44 ---------------------------- ui/task-priority-too-high.stderr | 15 ---------- ui/unknown-interrupt.rs | 15 ---------- ui/unknown-interrupt.stderr | 5 ---- ui/v6m-interrupt-not-enough.rs_no | 54 ----------------------------------- 11 files changed, 202 deletions(-) delete mode 100644 ui/exception-invalid.rs delete mode 100644 ui/exception-invalid.stderr delete mode 100644 ui/extern-interrupt-not-enough.rs delete mode 100644 ui/extern-interrupt-not-enough.stderr delete mode 100644 ui/extern-interrupt-used.rs delete mode 100644 ui/extern-interrupt-used.stderr delete mode 100644 ui/task-priority-too-high.rs delete mode 100644 ui/task-priority-too-high.stderr delete mode 100644 ui/unknown-interrupt.rs delete mode 100644 ui/unknown-interrupt.stderr delete mode 100644 ui/v6m-interrupt-not-enough.rs_no (limited to 'ui') diff --git a/ui/exception-invalid.rs b/ui/exception-invalid.rs deleted file mode 100644 index 4f8e943..0000000 --- a/ui/exception-invalid.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![no_main] - -#[rtic::app(device = lm3s6965)] -mod app { - #[shared] - struct Shared {} - - #[local] - struct Local {} - - #[init] - fn init(cx: init::Context) -> (Shared, Local) { - (Shared {}, Local {}) - } - - #[task(binds = NonMaskableInt)] - fn nmi(_: nmi::Context) {} -} diff --git a/ui/exception-invalid.stderr b/ui/exception-invalid.stderr deleted file mode 100644 index 3212368..0000000 --- a/ui/exception-invalid.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: only exceptions with configurable priority can be used as hardware tasks - --> $DIR/exception-invalid.rs:17:8 - | -17 | fn nmi(_: nmi::Context) {} - | ^^^ diff --git a/ui/extern-interrupt-not-enough.rs b/ui/extern-interrupt-not-enough.rs deleted file mode 100644 index 94c8ee1..0000000 --- a/ui/extern-interrupt-not-enough.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![no_main] - -#[rtic::app(device = lm3s6965)] -mod app { - #[shared] - struct Shared {} - - #[local] - struct Local {} - - #[init] - fn init(cx: init::Context) -> (Shared, Local) { - (Shared {}, Local {}) - } - - #[task] - async fn a(_: a::Context) {} -} diff --git a/ui/extern-interrupt-not-enough.stderr b/ui/extern-interrupt-not-enough.stderr deleted file mode 100644 index e6c01b9..0000000 --- a/ui/extern-interrupt-not-enough.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: not enough interrupts to dispatch all software tasks (need: 1; given: 0) - --> ui/extern-interrupt-not-enough.rs:17:14 - | -17 | async fn a(_: a::Context) {} - | ^ diff --git a/ui/extern-interrupt-used.rs b/ui/extern-interrupt-used.rs deleted file mode 100644 index 42de4c0..0000000 --- a/ui/extern-interrupt-used.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![no_main] - -#[rtic::app(device = lm3s6965, dispatchers = [UART0])] -mod app { - #[shared] - struct Shared {} - - #[local] - struct Local {} - - #[init] - fn init(cx: init::Context) -> (Shared, Local) { - (Shared {}, Local {}) - } - - #[task(binds = UART0)] - fn a(_: a::Context) {} -} diff --git a/ui/extern-interrupt-used.stderr b/ui/extern-interrupt-used.stderr deleted file mode 100644 index 7565739..0000000 --- a/ui/extern-interrupt-used.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: dispatcher interrupts can't be used as hardware tasks - --> $DIR/extern-interrupt-used.rs:16:20 - | -16 | #[task(binds = UART0)] - | ^^^^^ diff --git a/ui/task-priority-too-high.rs b/ui/task-priority-too-high.rs deleted file mode 100644 index 44e4a25..0000000 --- a/ui/task-priority-too-high.rs +++ /dev/null @@ -1,44 +0,0 @@ -#![no_main] - -#[rtic::app(device = lm3s6965)] -mod app { - #[shared] - struct Shared {} - - #[local] - struct Local {} - - #[init] - fn init(cx: init::Context) -> (Shared, Local) { - (Shared {}, Local {}) - } - - #[task(binds = GPIOA, priority = 1)] - fn gpioa(_: gpioa::Context) {} - - #[task(binds = GPIOB, priority = 2)] - fn gpiob(_: gpiob::Context) {} - - #[task(binds = GPIOC, priority = 3)] - fn gpioc(_: gpioc::Context) {} - - #[task(binds = GPIOD, priority = 4)] - fn gpiod(_: gpiod::Context) {} - - #[task(binds = GPIOE, priority = 5)] - fn gpioe(_: gpioe::Context) {} - - #[task(binds = UART0, priority = 6)] - fn uart0(_: uart0::Context) {} - - #[task(binds = UART1, priority = 7)] - fn uart1(_: uart1::Context) {} - - // OK, this is the maximum priority supported by the device - #[task(binds = SSI0, priority = 8)] - fn ssi0(_: ssi0::Context) {} - - // this value is too high! - #[task(binds = I2C0, priority = 9)] - fn i2c0(_: i2c0::Context) {} -} diff --git a/ui/task-priority-too-high.stderr b/ui/task-priority-too-high.stderr deleted file mode 100644 index 1256377..0000000 --- a/ui/task-priority-too-high.stderr +++ /dev/null @@ -1,15 +0,0 @@ -warning: unused variable: `cx` - --> ui/task-priority-too-high.rs:12:13 - | -12 | fn init(cx: init::Context) -> (Shared, Local) { - | ^^ help: if this is intentional, prefix it with an underscore: `_cx` - | - = note: `#[warn(unused_variables)]` on by default - -error[E0080]: evaluation of constant value failed - --> ui/task-priority-too-high.rs:3:1 - | -3 | #[rtic::app(device = lm3s6965)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'Maximum priority used by interrupt vector 'I2C0' is more than supported by hardware', $DIR/ui/task-priority-too-high.rs:3:1 - | - = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::core::panic` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/ui/unknown-interrupt.rs b/ui/unknown-interrupt.rs deleted file mode 100644 index 3c6c69f..0000000 --- a/ui/unknown-interrupt.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![no_main] - -#[rtic::app(device = lm3s6965, dispatchers = [UnknownInterrupt])] -mod app { - #[shared] - struct Shared {} - - #[local] - struct Local {} - - #[init] - fn init(cx: init::Context) -> (Shared, Local) { - (Shared {}, Local {}) - } -} diff --git a/ui/unknown-interrupt.stderr b/ui/unknown-interrupt.stderr deleted file mode 100644 index c7d3269..0000000 --- a/ui/unknown-interrupt.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error[E0599]: no variant or associated item named `UnknownInterrupt` found for enum `Interrupt` in the current scope - --> $DIR/unknown-interrupt.rs:3:47 - | -3 | #[rtic::app(device = lm3s6965, dispatchers = [UnknownInterrupt])] - | ^^^^^^^^^^^^^^^^ variant or associated item not found in `Interrupt` diff --git a/ui/v6m-interrupt-not-enough.rs_no b/ui/v6m-interrupt-not-enough.rs_no deleted file mode 100644 index 3fbf3cf..0000000 --- a/ui/v6m-interrupt-not-enough.rs_no +++ /dev/null @@ -1,54 +0,0 @@ -//! v6m-interrupt-not-enough.rs_no (not run atm) -//! -//! Expected behavior: -//! should pass -//! > cargo build --example m0_perf_err --target thumbv7m-none-eabi --release -//! -//! should fail -//! > cargo build --example m0_perf_err --target thumbv6m-none-eabi --release -//! Compiling cortex-m-rtic v1.0.0 (/home/pln/rust/rtic/cortex-m-rtic) -//! error[E0308]: mismatched types -//! --> examples/m0_perf_err.rs:25:1 -//! | -//! 25 | #[rtic::app(device = lm3s6965)] -//! | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a fixed size of 4 elements, found one with 5 elements -//! | -//! = note: this error originates in the attribute macro `rtic::app` (in Nightly builds, run with -Z macro-backtrace for more info) - -#![deny(unsafe_code)] -#![deny(warnings)] -#![no_main] -#![no_std] - -use panic_semihosting as _; - -#[rtic::app(device = lm3s6965)] -mod app { - - use cortex_m_semihosting::debug; - - #[shared] - struct Shared {} - - #[local] - struct Local {} - - #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics()) - } - - #[inline(never)] - #[idle] - fn idle(_cx: idle::Context) -> ! { - debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator - - loop { - cortex_m::asm::nop(); - } - } - - // priority to high for v6m - #[task(binds = GPIOA, priority = 5)] - fn t0(_cx: t0::Context) {} -} -- cgit v1.2.3