diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-08-02 14:56:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-02 14:56:06 +0000 |
| commit | 667484811106e7505d546f92090616a6acff7b80 (patch) | |
| tree | dc0e5a44ae5bcc9d68b6a240b43cb8006c810161 | |
| parent | c867f5ff9a475dc1293c89485b1e5f2016f99024 (diff) | |
| parent | f6f61f95a69786458a4fd06aa7fa33256b9e4603 (diff) | |
Merge #506
506: book: Add note to remember to choose target r=AfoHT a=CuriouslyCurious
While following the instructions in the book I ran into a wall. I was getting linker errors and had no idea why. Turns out trying to run `cargo build --example init` on an x86 build target maybe doesn't work too well, so I added a note about it. :sweat_smile:
I'll leave this as a draft since my Russian isn't fluent enough to add the note there as well. Also, adding a modified version of `.config/cargo.toml` from the embedded example might be a decent idea but wanted to hear from you guys first. :P
Co-authored-by: CuriouslyCurious <thecuriouslycurious@protonmail.com>
| -rw-r--r-- | book/en/src/by-example/app.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/book/en/src/by-example/app.md b/book/en/src/by-example/app.md index 50f2842..5fd1c25 100644 --- a/book/en/src/by-example/app.md +++ b/book/en/src/by-example/app.md @@ -53,6 +53,12 @@ $ cargo run --example init {{#include ../../../../ci/expected/init.run}} ``` +> **NOTE**: Remember to specify your chosen target device by passing a target +> 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` A function marked with the `idle` attribute can optionally appear in the @@ -120,7 +126,7 @@ crate. When the `priority` argument is omitted, the priority is assumed to be `1`. The `idle` task has a non-configurable static priority of `0`, the lowest priority. > A higher number means a higher priority in RTIC, which is the opposite from what -> Cortex-M does in the NVIC peripheral. +> Cortex-M does in the NVIC peripheral. > Explicitly, this means that number `10` has a **higher** priority than number `9`. When several tasks are ready to be executed the one with highest static |
