diff --git a/CHANGELOG.md b/CHANGELOG.md index fb1102c0ea..b1a3373c18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] -## v0.5.0 - 2019-??-?? (ALPHA pre-release) +## v0.5.0 - 2019-09-?? (currently in beta pre-release) + +### Added + +- Experimental support for homogeneous and heterogeneous multi-core + microcontrollers has been added. Support is gated behind the `homogeneous` and + `heterogeneous` Cargo features. ### Changed @@ -23,6 +29,35 @@ This project adheres to [Semantic Versioning](http://semver.org/). instead of `AtomicUsize`; this reduces the static memory used by the framework. +- [breaking-change][] when the `capacity` argument is omitted, the capacity of + the task is assumed to be `1`. Before, a reasonable (but hard to predict) + capacity was computed based on the number of `spawn` references the task had. + +- [breaking-change][] resources that are appear as exclusive references + (`&mut-`) no longer appear behind the `Exclusive` newtype. + +- [breaking-change][] the `timer-queue` Cargo feature has been removed. The + `schedule` API can be used without enabling any Cargo feature. + +- [breaking-change][] when the `schedule` API is used the type of + `init::Context.core` changes from `cortex_m::Peripherals` to + `rtfm::Peripherals`. The fields of `rtfm::Peripherals` do not change when + Cargo features are enabled. + +- [breaking-change][] the monotonic timer used to implement the `schedule` API + is now user configurable via the `#[app(monotonic = ..)]` argument. + +- [breaking-change][] the `peripherals` field is not include in `init::Context` + by default. One must opt-in using the `#[app(peripherals = ..)]` argument. + +- [breaking-change][] the `#[exception]` and `#[interrupt]` attributes have been + removed. Hardware tasks are now declared using the `#[task(binds = ..)]` + attribute. + +- [breaking-change][] the syntax to declare resources has changed. Instead of + using a `static [mut]` variable for each resource, all resources must be + declared in a `Resources` structure. + ### Removed - [breaking-change] the integration with the `owned_singleton` crate has been diff --git a/book/en/src/by-example/app.md b/book/en/src/by-example/app.md index ebb71f1be0..f6871942ae 100644 --- a/book/en/src/by-example/app.md +++ b/book/en/src/by-example/app.md @@ -13,9 +13,9 @@ point to a *peripheral access crate* (PAC) generated using [`svd2rust`] **v0.14.x** or newer. The `app` attribute will expand into a suitable entry point so it's not required to use the [`cortex_m_rt::entry`] attribute. -[`app`]: ../../api/cortex_m_rtfm_macros/attr.app.html +[`app`]: ../../../api/cortex_m_rtfm_macros/attr.app.html [`svd2rust`]: https://crates.io/crates/svd2rust -[`cortex_m_rt::entry`]: ../../api/cortex_m_rt_macros/attr.entry.html +[`cortex_m_rt::entry`]: ../../../api/cortex_m_rt_macros/attr.entry.html > **ASIDE**: Some of you may be wondering why we are using a `const` item as a > module and not a proper `mod` item. The reason is that using attributes on diff --git a/book/en/src/by-example/resources.md b/book/en/src/by-example/resources.md index e8f61d5653..b33ca9bbba 100644 --- a/book/en/src/by-example/resources.md +++ b/book/en/src/by-example/resources.md @@ -46,8 +46,8 @@ instead of a reference. This resource proxy is a structure that implements the [`Mutex`] trait. The only method on this trait, [`lock`], runs its closure argument in a critical section. -[`Mutex`]: ../../api/rtfm/trait.Mutex.html -[`lock`]: ../../api/rtfm/trait.Mutex.html#method.lock +[`Mutex`]: ../../../api/rtfm/trait.Mutex.html +[`lock`]: ../../../api/rtfm/trait.Mutex.html#method.lock The critical section created by the `lock` API is based on dynamic priorities: it temporarily raises the dynamic priority of the context to a *ceiling* @@ -89,7 +89,7 @@ consumer and producer end points in `init` and then each end point is stored in a different resource; `UART0` owns the producer resource and `idle` owns the consumer resource. -[`Queue`]: ../../api/heapless/spsc/struct.Queue.html +[`Queue`]: ../../../api/heapless/spsc/struct.Queue.html ``` rust {{#include ../../../../examples/late.rs}} diff --git a/book/en/src/by-example/timer-queue.md b/book/en/src/by-example/timer-queue.md index 57e9d01bd0..7c8be382e8 100644 --- a/book/en/src/by-example/timer-queue.md +++ b/book/en/src/by-example/timer-queue.md @@ -20,7 +20,7 @@ type (see [`core::time::Duration`]) and this `Duration` type must implement the integer. If the result of the conversion doesn't fit in a 32-bit number then the operation must return an error, any error type. -[`Monotonic`]: ../../api/rtfm/trait.Monotonic.html +[`Monotonic`]: ../../../api/rtfm/trait.Monotonic.html [std-instant]: https://doc.rust-lang.org/std/time/struct.Instant.html [`core::time::Duration`]: https://doc.rust-lang.org/core/time/struct.Duration.html diff --git a/book/en/src/by-example/tips.md b/book/en/src/by-example/tips.md index 3852b449d5..a0082060a9 100644 --- a/book/en/src/by-example/tips.md +++ b/book/en/src/by-example/tips.md @@ -16,7 +16,7 @@ one can write a generic function that operates on generic resources and call it from different tasks to perform some operation on the same set of resources. Here's one such example: -[`rtfm::Exclusive`]: ../../api/rtfm/struct.Exclusive.html +[`rtfm::Exclusive`]: ../../../api/rtfm/struct.Exclusive.html ``` rust {{#include ../../../../examples/generics.rs}} diff --git a/book/en/src/preface.md b/book/en/src/preface.md index 4b53706514..b2f4980f2f 100644 --- a/book/en/src/preface.md +++ b/book/en/src/preface.md @@ -5,14 +5,14 @@ # Preface 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). +(RTFM) framework. The API reference can be found [here](../../api/). There is a translation of this book in [Russian]. [Russian]: ../ru/index.html This is the documentation of v0.5.x of RTFM; for the documentation of version -v0.4.x go [here](../../0.4/book/en). +v0.4.x go [here](/0.4). **HEADS UP** This is a **beta** pre-release; there may be breaking changes in the API and semantics before a proper release is made. diff --git a/book/ru/src/by-example/app.md b/book/ru/src/by-example/app.md index 18147dc3f8..bf8d5746dc 100644 --- a/book/ru/src/by-example/app.md +++ b/book/ru/src/by-example/app.md @@ -13,9 +13,9 @@ [`svd2rust`] **v0.14.x**. Атрибут `app` развернется в удобную точку входа, поэтому нет необходимости использовать атрибут [`cortex_m_rt::entry`]. -[`app`]: ../../api/cortex_m_rtfm_macros/attr.app.html +[`app`]: ../../../api/cortex_m_rtfm_macros/attr.app.html [`svd2rust`]: https://crates.io/crates/svd2rust -[`cortex_m_rt::entry`]: ../../api/cortex_m_rt_macros/attr.entry.html +[`cortex_m_rt::entry`]: ../../../api/cortex_m_rt_macros/attr.entry.html > **ОТСТУПЛЕНИЕ**: Некоторые из вас удивятся, почему мы используем ключевое слово `const` как > модуль, а не правильное `mod`. Причина в том, что использование атрибутов на diff --git a/book/ru/src/by-example/resources.md b/book/ru/src/by-example/resources.md index c13822f78c..746363f164 100644 --- a/book/ru/src/by-example/resources.md +++ b/book/ru/src/by-example/resources.md @@ -51,7 +51,7 @@ API критической секции, предоставляемое фрей включая все соперничающие за ресурс, но будут позволять запуск обработчиков с большим приоритетом не соперничащих за ресурс. -[`Mutex`]: ../../api/rtfm/trait.Mutex.html +[`Mutex`]: ../../../api/rtfm/trait.Mutex.html В примере ниже у нас есть 3 обработчика прерываний с приоритетами от одного до трех. Два обработчика с низким приоритетом соперничают за ресурс `SHARED`. @@ -61,7 +61,7 @@ API критической секции, предоставляемое фрей с наивысшим приоритетом может свободно вытеснять критическую секцию, созданную обработчиком с низшим приоритетом. -[`lock`]: ../../api/rtfm/trait.Mutex.html#method.lock +[`lock`]: ../../../api/rtfm/trait.Mutex.html#method.lock ``` rust {{#include ../../../../examples/lock.rs}} @@ -90,7 +90,7 @@ $ cargo run --example lock расположен в отдельном ресурсе; `UART0` владеет ресурсом произодителя, а `idle` владеет ресурсом потребителя. -[`Queue`]: ../../api/heapless/spsc/struct.Queue.html +[`Queue`]: ../../../api/heapless/spsc/struct.Queue.html ``` rust {{#include ../../../../examples/late.rs}} diff --git a/book/ru/src/by-example/timer-queue.md b/book/ru/src/by-example/timer-queue.md index 8995bd056c..d747731d4d 100644 --- a/book/ru/src/by-example/timer-queue.md +++ b/book/ru/src/by-example/timer-queue.md @@ -9,7 +9,7 @@ планируется, момент ([`Instant`]), в который задачу нужно запустить, нужно передать как первый аргумент вызова `schedule`. -[`Instant`]: ../../api/rtfm/struct.Instant.html +[`Instant`]: ../../../api/rtfm/struct.Instant.html Рантайм RTFM включает монотонный, растущий только вверх, 32-битный таймер, значение которого можно запросить конструктором `Instant::now`. Время ([`Duration`]) @@ -18,7 +18,7 @@ значение `Instant(0 /* циклов тактовой частоты */)`; таймер включается сразу перед включением прерываний и запуском `idle`. -[`Duration`]: ../../api/rtfm/struct.Duration.html +[`Duration`]: ../../../api/rtfm/struct.Duration.html В примере ниже две задачи планируются из `init`: `foo` и `bar`. `foo` - запланирована на запуск через 8 миллионов тактов в будущем. Кроме того, `bar` diff --git a/book/ru/src/preface.md b/book/ru/src/preface.md index 0f9bd67ed6..e9ed2a2bce 100644 --- a/book/ru/src/preface.md +++ b/book/ru/src/preface.md @@ -5,7 +5,7 @@ # Введение Эта книга содержит документацию уровня пользователя фреймворком Real Time For the Masses -(RTFM). Описание API можно найти [здесь](../api/rtfm/index.html). +(RTFM). Описание API можно найти [здесь](../../api/rtfm/index.html). {{#include README_RU.md:5:44}}