diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2020-10-15 17:55:00 +0200 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2020-10-15 17:55:00 +0200 |
| commit | 5ac16f6aae7c4760711b1eef5cbaf1c57c5933ca (patch) | |
| tree | ad2e1b0ac81f3ffebe73edcf62b8cc4472eaff13 /book/en/src/by-example/new.md | |
| parent | 5b8e6a22ab68e316e11641dedf5b39e20878c7b7 (diff) | |
| parent | ee0885063d5b1cc4eddd3918ff425796f6213464 (diff) | |
Merge branch 'master' into spawn_experiment
Diffstat (limited to 'book/en/src/by-example/new.md')
| -rw-r--r-- | book/en/src/by-example/new.md | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/book/en/src/by-example/new.md b/book/en/src/by-example/new.md index 866a9fa..82681bf 100644 --- a/book/en/src/by-example/new.md +++ b/book/en/src/by-example/new.md @@ -52,7 +52,23 @@ $ curl \ > src/main.rs ``` -That example depends on the `panic-semihosting` crate: +The `init` example uses the `lm3s6965` device. Remember to adjust the `device` +argument in the app macro attribute to match the path of your PAC crate, if +different, and add peripherals or other arguments if needed. Although aliases +can be used, this needs to be a full path (from the crate root). For many +devices, it is common for the HAL implementation crate (aliased as `hal`) or +Board Support crate to re-export the PAC as `pac`, leading to a pattern similar +to the below: + +```rust +use abcd123_hal as hal; +//... + +#[rtic::app(device = crate::hal::pac, peripherals = true, monotonic = rtic::cyccnt::CYCCNT)] +mod app { /*...*/ } +``` + +The `init` example also depends on the `panic-semihosting` crate: ``` console $ cargo add panic-semihosting |
