aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/app.md
diff options
context:
space:
mode:
authorCuriouslyCurious <thecuriouslycurious@protonmail.com>2021-07-29 13:58:21 +0200
committerCuriouslyCurious <thecuriouslycurious@protonmail.com>2021-07-29 13:58:21 +0200
commit7a977f3fa99adcdf160761bf96268e6c89dd27fb (patch)
treec159a5763122aed5d6db03f97e41f273646fa775 /book/en/src/by-example/app.md
parente90e6332f69cde78c902ba554b3d2930ab173124 (diff)
book: Add link to new.md
Diffstat (limited to 'book/en/src/by-example/app.md')
-rw-r--r--book/en/src/by-example/app.md27
1 files changed, 1 insertions, 26 deletions
diff --git a/book/en/src/by-example/app.md b/book/en/src/by-example/app.md
index e8e1d7a..c84f7a4 100644
--- a/book/en/src/by-example/app.md
+++ b/book/en/src/by-example/app.md
@@ -6,32 +6,6 @@ This is the smallest possible RTIC application:
{{#include ../../../../examples/smallest.rs}}
```
-All RTIC applications use the [`app`] attribute (`#[app(..)]`). This attribute
-must be applied to a `mod`-item. The `app` attribute has a mandatory `device`
-argument that takes a *path* as a value. This must be a full path pointing to a
-*peripheral access crate* (PAC) generated using [`svd2rust`] **v0.14.x** or
-newer. More details can be found in the [Starting a new project](./new.md)
-section.
-
-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_rtic_macros/attr.app.html
-[`svd2rust`]: https://crates.io/crates/svd2rust
-[`cortex_m_rt::entry`]: ../../../api/cortex_m_rt_macros/attr.entry.html
-
-## `init`
-
-Within the `app` module the attribute expects to find an initialization
-function marked with the `init` attribute. This function must have
-signature `fn(init::Context) -> (init::LateResources, init::Monotonics)`.
-
-This initialization function will be the first part of the application to run.
-The `init` function will run *with interrupts disabled* and has exclusive access
-to Cortex-M where the `bare_metal::CriticalSection` token is available as `cs`.
-And optionally, device specific peripherals through the `core` and `device` fields
-of `init::Context`.
-
`static mut` variables declared at the beginning of `init` will be transformed
into `&'static mut` references that are safe to access. Notice, this feature may be deprecated in next release, see `task_local` resources.
@@ -57,6 +31,7 @@ $ cargo run --example init
> triple to cargo (e.g `cargo run --example init --target thumbv7m-none-eabi`) or
> configure a device to be used by default when building the examples in `.cargo/config.toml`.
> In this case, we use a Cortex M3 emulated in QEMU so the target is `thumbv7m-none-eabi`.
+> See [`Starting a new project`](./new.md) for more info.
## `idle`