Skip to content

Commit 1b8527d

Browse files
committed
Initial outline runthrough, added a couple sections
1 parent 808e036 commit 1b8527d

37 files changed

+316
-2
lines changed

embedded-rust-book/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# [Work in Progress] - The Embedded Rust Book
2+
3+
See [this issue] for more details. This is a very early work in progress.
4+
5+
[this issue]: https://github.com/rust-lang-nursery/embedded-wg/issues/56
6+
7+
## Using
8+
9+
```
10+
cargo install mdbook
11+
cd embedded-rust-book
12+
mdbook serve
13+
14+
# open a web browser, go to http://localhost:3001
15+
```
16+
17+
## License
18+
19+
Not yet determined. Likely Apache/MIT, maybe something CC.

embedded-rust-book/src/SUMMARY.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
- [Linking](./blinky/linking.md)
1313
- [Running and Debugging](./blinky/run-and-debug.md)
1414
- [The `Embedded-HAL` Ecosystem](./embedded-hal/embedded-hal.md)
15+
- [Register Definition Crates](./embedded-hal/rdc.md)
1516
- [Chip Support Crates](./embedded-hal/csp.md)
16-
- [Board Support Crates](./embedded-hal/bsp.md)
1717
- [`Embedded-HAL` Traits](./embedded-hal/traits.md)
1818
- [Driver Crates](./embedded-hal/drivers.md)
19+
- [Board Support Crates](./embedded-hal/bsp.md)-
1920
- [Your Application Code](./embedded-hal/application.md)
2021
- [Changing Targets](./embedded-hal/changing-targets.md)
2122
- [RTFM: An `Embedded-HAL` based RTOS](./embedded-hal/rtfm.md)
@@ -32,4 +33,6 @@
3233
- [Embracing Abstractions](./unsorted/abstractions.md)
3334
- [Unlearning Bad Embedded Habits](./unsorted/unlearning.md)
3435
- [Proper use of `unsafe`](./unsorted/unsafe.md)
35-
- [Embedded Linux](./unsorted/embedded-linux.md)
36+
- [Things we don't know how to do yet](./unsorted/unknown.md)
37+
- [Embedded Linux](./unsorted/embedded-linux.md)
38+
- [Glossary](./unsorted/glossary.md)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
# Blinking your first LED
2+
3+
> **This section should cover:**
4+
>
5+
> * This section should be an intro using (ideally) NO external crates on how to blink an LED in as few steps as possible
6+
> * It should be a step by step guide that introduces parts of Rust tooling that are not common to desktop programs
7+
> * It should also introduce the concept of using `unsafe` to manually dereference raw pointers to talk to a peripheral
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
# Compiling
2+
3+
> **This section should cover:**
4+
>
5+
> * How to compile
6+
> * Whatever errors are produced because we dont have a linker script (yet)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
# Linking
2+
3+
> **This section should cover:**
4+
>
5+
> * Adding a linker script to the project
6+
> * Informing Cargo about the linker script
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
# Running and Debugging
2+
3+
> **This section should cover:**
4+
>
5+
> * Using `openocd` and `gdb` to connect to the target
6+
> * Uploading the firmware to the target
7+
> * Stepping through the code on the target
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# Project Setup
2+
3+
> **This section should cover:**
4+
>
5+
> * From a blank folder to a new cargo project
6+
> * `.cargo/config` and necessary contents
7+
> * `Cargo.toml` oddities
8+
> * `Xargo.toml`, if necessary for now
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
# Writing
2+
3+
> **This section should cover:**
4+
>
5+
> * Any code necessary to add to blink an LED
6+
> * What the code we added means (remember, we have experienced developers here)
7+
> * Note similarities with writing desktop rust code
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
# Your Application Code
2+
3+
> **This section should cover:**
4+
>
5+
> * Writing a fancier application using all the stuff we've learned
6+
> * Best practices for structuring a project
7+
> * Integrating other crates, including
8+
> * more drivers
9+
> * `#[no_std]` crates (maybe `serde` or similar?)
10+
> * Using `embedded-hal` traits for portability
11+
> * Allocators?
12+
> * More powerful parts of the `core` language? Iterators? Matching, etc?
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# Board Support Crates
2+
3+
> **This section should cover:**
4+
>
5+
> * BSPs are just specialized CSPs + specific drivers
6+
> * Useful for development boards
7+
> * Probably worth building for your own projects
8+
> * Simpler blinky (vs CSP), because certain things are "hardwired", and drivers are already included

0 commit comments

Comments
 (0)