From 06c1e2f9b47b5bc9de049e1e1edfed27d8dd2c58 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 16 Dec 2018 19:34:16 +0100 Subject: [PATCH] note that the timer queue is not supported on ARMv6-M --- CHANGELOG.md | 3 +-- README.md | 4 +++- book/src/preface.md | 4 ++-- build.rs | 4 ++++ ci/script.sh | 26 ++++++++++++++++++-------- src/lib.rs | 5 +++++ 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7fc88a48f..6b643f0a54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed -- This crate now compiles on 1.31-beta and will compile on the stable 1.31 - release. +- This crate now compiles on stable 1.31. - [breaking-change] The `app!` macro has been transformed into an attribute. See the documentation for details. diff --git a/README.md b/README.md index 6c78e8bd7c..367a99275e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,9 @@ behave the way you expect please open [an issue]! - **Highly efficient memory usage**: All the tasks share a single call stack and there's no hard dependency on a dynamic memory allocator. -- **All Cortex-M devices are fully supported**. +- **All Cortex-M devices are supported**. The core features of RTFM are + supported on all Cortex-M devices. The timer queue is currently only supported + on ARMv7-M devices. - This task model is amenable to known WCET (Worst Case Execution Time) analysis and scheduling analysis techniques. (Though we haven't yet developed Rust diff --git a/book/src/preface.md b/book/src/preface.md index c041ef5fa9..fe4ad620d3 100644 --- a/book/src/preface.md +++ b/book/src/preface.md @@ -7,6 +7,6 @@ This book contains user level documentation for the Real Time For the Masses (RTFM) framework. The API reference can be found [here](../api/rtfm/index.html). -{{#include ../../README.md:5:53}} +{{#include ../../README.md:5:55}} -{{#include ../../README.md:59:}} +{{#include ../../README.md:61:}} diff --git a/build.rs b/build.rs index b29f0bd681..2419b4eb84 100644 --- a/build.rs +++ b/build.rs @@ -3,6 +3,10 @@ use std::env; fn main() { let target = env::var("TARGET").unwrap(); + if target.starts_with("thumbv6m") { + println!("cargo:rustc-cfg=armv6m") + } + if target.starts_with("thumbv7m") | target.starts_with("thumbv7em") { println!("cargo:rustc-cfg=armv7m") } diff --git a/ci/script.sh b/ci/script.sh index 20394d5cdc..0244c58171 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -12,11 +12,17 @@ main() { esac cargo check --target $T - cargo check --features timer-queue --target $T + if [ $TARGET != thumbv6m-none-eabi ]; then + cargo check --features timer-queue --target $T + fi - if [ $TRAVIS_RUST_VERSION = beta ]; then + if [ $TRAVIS_RUST_VERSION != nightly ]; then rm -f .cargo/config - cargo doc --features timer-queue + if [ $TARGET != thumbv6m-none-eabi ]; then + cargo doc --features timer-queue + else + cargo doc + fi ( cd book && mdbook build ) local td=$(mktemp -d) @@ -33,7 +39,9 @@ main() { fi cargo check --target $T --examples - cargo check --features timer-queue --target $T --examples + if [ $TARGET != thumbv6m-none-eabi ]; then + cargo check --features timer-queue --target $T --examples + fi # run-pass tests case $T in @@ -76,11 +84,13 @@ main() { diff -u ci/expected/$ex.run - fi - cargo run --features timer-queue --example $ex --target $T | \ - diff -u ci/expected/$ex.run - + if [ $TARGET != thumbv6m-none-eabi ]; then + cargo run --features timer-queue --example $ex --target $T | \ + diff -u ci/expected/$ex.run - - cargo run --features timer-queue --example $ex --target $T --release | \ - diff -u ci/expected/$ex.run - + cargo run --features timer-queue --example $ex --target $T --release | \ + diff -u ci/expected/$ex.run - + fi done esac } diff --git a/src/lib.rs b/src/lib.rs index 213037b7e5..ba60078d7d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,6 +44,11 @@ pub mod export; #[cfg(feature = "timer-queue")] mod tq; +#[cfg(all(feature = "timer-queue", armv6m))] +compile_error!( + "The `timer-queue` feature is currently not supported on ARMv6-M (`thumbv6m-none-eabi`)" +); + /// Core peripherals /// /// This is `cortex_m::Peripherals` minus the peripherals that the RTFM runtime uses