Skip to content

Commit 8cb8ea9

Browse files
authored
Merge pull request #133 from rust-embedded/outline-and-intro
Book: Outline and Intro Rework
2 parents 341193f + 0f65528 commit 8cb8ea9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+458
-303
lines changed
+29-31
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
11
# Summary
22

3+
<!--
4+
5+
Definition of the organization of this book is still a work in process.
6+
7+
Refer to https://github.com/rust-lang-nursery/embedded-wg/issues/115 for
8+
more information and coordination
9+
10+
-->
11+
312
- [Introduction](./intro/introduction.md)
4-
- [Preconditions](./intro/preconditions.md)
513
- [Installation](./intro/install.md)
14+
- [Linux](./intro/install/linux.md)
15+
- [MacOS](./intro/install/macos.md)
16+
- [Windows](./intro/install/windows.md)
17+
- [Verify Installation](./intro/install/verify.md)
618
- [Tooling](./intro/tooling.md)
719
- [Hardware](./intro/hardware.md)
20+
- [`no_std`](./intro/no-std.md)
821
- [Blinking your first LED](./blinky/blinky.md)
9-
- [Project Setup](./blinky/setup.md)
10-
- [Writing](./blinky/writing.md)
11-
- [Compiling](./blinky/compiling.md)
12-
- [Linking](./blinky/linking.md)
13-
- [Running and Debugging](./blinky/run-and-debug.md)
14-
- [The `Embedded-HAL` Ecosystem](./embedded-hal/embedded-hal.md)
15-
- [Register Definition Crates](./embedded-hal/rdc.md)
16-
- [Chip Support Crates](./embedded-hal/csp.md)
17-
- [`Embedded-HAL` Traits](./embedded-hal/traits.md)
18-
- [Driver Crates](./embedded-hal/drivers.md)
19-
- [Board Support Crates](./embedded-hal/bsp.md)-
20-
- [Your Application Code](./embedded-hal/application.md)
21-
- [Changing Targets](./embedded-hal/changing-targets.md)
22-
- [RTFM: An `Embedded-HAL` based RTOS](./embedded-hal/rtfm.md)
23-
- [The `Tock-OS` Ecosystem](./tock/tock-os.md)
24-
- [Interoperability with existing codebases](./interop/interop.md)
25-
- [A little C with your Rust](./interop/a-little-c.md)
26-
- [A little Rust with your C](./interop/a-little-rust.md)
27-
- [Using Cargo as the primary build system](./interop/build-with-cargo.md)
28-
- [Using Cargo as a secondary build system](./interop/build-with-not-cargo.md)
29-
- [Integrating with FreeRTOS](./interop/freertos.md)
30-
- [Testing your embedded project](./testing/testing.md)
31-
32-
- [Unsorted](./unsorted/unsorted.md)
33-
- [Embracing Abstractions](./unsorted/abstractions.md)
34-
- [Unlearning Bad Embedded Habits](./unsorted/unlearning.md)
35-
- [Proper use of `unsafe`](./unsorted/unsafe.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)
22+
- [Static Guarantees](./static-guarantees/static-guarantees.md)
23+
<!-- TODO: Define Sections -->
24+
- [Portability](./portability/portability.md)
25+
<!-- TODO: Define Sections -->
26+
- [Singletons](./singletons/singletons.md)
27+
<!-- TODO: Define Sections -->
28+
- [Concurrency](./concurrency/concurrency.md)
29+
<!-- TODO: Define Sections -->
30+
- [Dynamic Data Structures](./dynamic/dynamic.md)
31+
<!-- TODO: Define Sections -->
32+
- [Tips for embedded C developers](./c-tips/c-tips.md)
33+
<!-- TODO: Define Sections -->
34+
- [Interoperability](./interoperability/interoperability.md)
35+
- [A little C with your Rust](./interoperability/c-with-rust.md)
36+
- [A little Rust with your C](./interoperability/rust-with-c.md)
253 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
# Blinking your first LED
22

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
3+
> ❌: This section has not yet been written. Please refer to [embedded-wg#117](https://github.com/rust-lang-nursery/embedded-wg/issues/117) for discussion of this section.

books/embedded-rust-book/src/blinky/compiling.md

-6
This file was deleted.

books/embedded-rust-book/src/blinky/linking.md

-6
This file was deleted.

books/embedded-rust-book/src/blinky/run-and-debug.md

-7
This file was deleted.

books/embedded-rust-book/src/blinky/setup.md

-8
This file was deleted.

books/embedded-rust-book/src/blinky/writing.md

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Tips for embedded C developers
2+
3+
> ❌: This section has not yet been written. Please refer to [embedded-wg#126](https://github.com/rust-lang-nursery/embedded-wg/issues/126) for discussion of this section.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Concurrency
2+
3+
> ❌: This section has not yet been written. Please refer to [embedded-wg#124](https://github.com/rust-lang-nursery/embedded-wg/issues/124) for discussion of this section.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Dynamic Data Structures
2+
3+
> ❌: This section has not yet been written. Please refer to [embedded-wg#125](https://github.com/rust-lang-nursery/embedded-wg/issues/125) for discussion of this section.

books/embedded-rust-book/src/embedded-hal/application.md

-12
This file was deleted.

books/embedded-rust-book/src/embedded-hal/bsp.md

-8
This file was deleted.

books/embedded-rust-book/src/embedded-hal/changing-targets.md

-7
This file was deleted.

books/embedded-rust-book/src/embedded-hal/csp.md

-9
This file was deleted.

books/embedded-rust-book/src/embedded-hal/drivers.md

-7
This file was deleted.

books/embedded-rust-book/src/embedded-hal/embedded-hal.md

-9
This file was deleted.

books/embedded-rust-book/src/embedded-hal/rdc.md

-10
This file was deleted.

books/embedded-rust-book/src/embedded-hal/rtfm.md

-8
This file was deleted.

books/embedded-rust-book/src/embedded-hal/traits.md

-12
This file was deleted.

books/embedded-rust-book/src/interop/a-little-c.md

-16
This file was deleted.

books/embedded-rust-book/src/interop/a-little-rust.md

-8
This file was deleted.

books/embedded-rust-book/src/interop/build-with-cargo.md

-5
This file was deleted.

books/embedded-rust-book/src/interop/build-with-not-cargo.md

-7
This file was deleted.

books/embedded-rust-book/src/interop/freertos.md

-7
This file was deleted.

books/embedded-rust-book/src/interop/interop.md

-11
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# A little C with your Rust
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Interoperability
2+
3+
> ❌: This section has not yet been written. Please refer to [embedded-wg#48](https://github.com/rust-lang-nursery/embedded-wg/issues/48) for discussion of this section.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# A little Rust with your C

books/embedded-rust-book/src/intro/hardware.md

+50-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,52 @@
1-
# Hardware
2-
3-
> **This section should cover:**
1+
> **⚠️: This section contains exports from [Japaric's Discovery] book.**
42
>
5-
> * Meet the hardware
3+
> Contents should be reviewed for consistency in the context
4+
> of this book before "publishing"
5+
6+
[Japaric's Discovery]: https://japaric.github.io/discovery/
7+
8+
# Meet your hardware
9+
10+
Let's get familiar with the hardware we'll be working with.
11+
12+
## STM32F3DISCOVERY (the "F3")
13+
14+
<p align="center">
15+
<img title="F3" src="assets/f3.jpg">
16+
</p>
17+
18+
We'll refer to this board as "F3" throughout this book.
19+
20+
What does this board contain?
21+
22+
- A STM32F303VCT6 microcontroller. This microcontroller has
23+
- A single core ARM Cortex-M4F processor with hardware support for single precision floating point
24+
operations and a maximum clock frequency of 72 MHz.
25+
26+
- 256 KiB of "Flash" memory. (1 KiB = 10**24** bytes)
27+
28+
- 48 KiB of RAM.
29+
30+
- many "peripherals": timers, GPIO, I2C, SPI, USART, etc.
31+
32+
- lots of "pins" that are exposed in the two lateral "headers".
33+
34+
- **IMPORTANT** This microcontroller operates at (around) 3.3V.
35+
36+
- An [accelerometer] and a [magnetometer][] (in a single package).
37+
38+
[accelerometer]: https://en.wikipedia.org/wiki/Accelerometer
39+
[magnetometer]: https://en.wikipedia.org/wiki/Magnetometer
40+
41+
- A [gyroscope].
42+
43+
[gyroscope]: https://en.wikipedia.org/wiki/Gyroscope
44+
45+
- 8 user LEDs arranged in the shape of a compass
46+
47+
- A second microcontroller: a STM32F103CBT. This microcontroller is actually part of an on-board
48+
programmer and debugger named ST-LINK and is connected to the USB port named "USB ST-LINK".
49+
50+
- There's a second USB port, labeled "USB USER" that is connected to the main microcontroller, the
51+
STM32F303VCT6, and can be used in applications.
652

7-
> **This section should steal:**
8-
>
9-
> * https://japaric.github.io/discovery/04-meet-your-hardware/README.html

0 commit comments

Comments
 (0)