aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2024-05-21 08:11:34 +0000
committerGitHub <[email protected]>2024-05-21 08:11:34 +0000
commitcd27439fca0332ca1c20931ce587471f53e1b0ec (patch)
tree8dd446c12202d5e242ba287f54cdf737ef29bd96
parent51d553092550059afb22b2620cea14bbed21abff (diff)
parentbb9c687a39c0675bd622f612a645b16229cb9024 (diff)
Merge pull request #2958 from embassy-rs/embassy-book-refactor
Embassy book refactor
-rw-r--r--.github/ci/book.sh17
-rwxr-xr-xci.sh10
-rw-r--r--docs/Makefile8
-rw-r--r--docs/README.md9
-rw-r--r--docs/antora.yml5
-rw-r--r--docs/examples/basic/.cargo/config.toml (renamed from docs/modules/ROOT/examples/basic/.cargo/config.toml)0
-rw-r--r--docs/examples/basic/Cargo.toml18
-rw-r--r--docs/examples/basic/build.rs (renamed from docs/modules/ROOT/examples/basic/build.rs)0
-rw-r--r--docs/examples/basic/memory.x (renamed from docs/modules/ROOT/examples/basic/memory.x)0
-rw-r--r--docs/examples/basic/src/main.rs (renamed from docs/modules/ROOT/examples/basic/src/main.rs)0
l---------docs/examples/examples1
-rw-r--r--docs/examples/layer-by-layer/.cargo/config.toml (renamed from docs/modules/ROOT/examples/layer-by-layer/.cargo/config.toml)0
-rw-r--r--docs/examples/layer-by-layer/Cargo.toml (renamed from docs/modules/ROOT/examples/layer-by-layer/Cargo.toml)4
-rw-r--r--docs/examples/layer-by-layer/blinky-async/Cargo.toml (renamed from docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml)0
-rw-r--r--docs/examples/layer-by-layer/blinky-async/src/main.rs (renamed from docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs)0
-rw-r--r--docs/examples/layer-by-layer/blinky-hal/Cargo.toml (renamed from docs/modules/ROOT/examples/layer-by-layer/blinky-hal/Cargo.toml)0
-rw-r--r--docs/examples/layer-by-layer/blinky-hal/src/main.rs (renamed from docs/modules/ROOT/examples/layer-by-layer/blinky-hal/src/main.rs)0
-rw-r--r--docs/examples/layer-by-layer/blinky-irq/Cargo.toml (renamed from docs/modules/ROOT/examples/layer-by-layer/blinky-irq/Cargo.toml)0
-rw-r--r--docs/examples/layer-by-layer/blinky-irq/src/main.rs (renamed from docs/modules/ROOT/examples/layer-by-layer/blinky-irq/src/main.rs)0
-rw-r--r--docs/examples/layer-by-layer/blinky-pac/Cargo.toml (renamed from docs/modules/ROOT/examples/layer-by-layer/blinky-pac/Cargo.toml)0
-rw-r--r--docs/examples/layer-by-layer/blinky-pac/src/main.rs (renamed from docs/modules/ROOT/examples/layer-by-layer/blinky-pac/src/main.rs)0
-rw-r--r--docs/images/bootloader_flash.png (renamed from docs/modules/ROOT/images/bootloader_flash.png)bin32147 -> 32147 bytes
-rw-r--r--docs/images/embassy_executor.drawio (renamed from docs/modules/ROOT/images/embassy_executor.drawio)0
-rw-r--r--docs/images/embassy_executor.png (renamed from docs/modules/ROOT/images/embassy_executor.png)bin121382 -> 121382 bytes
-rw-r--r--docs/images/embassy_irq.drawio (renamed from docs/modules/ROOT/images/embassy_irq.drawio)0
-rw-r--r--docs/images/embassy_irq.png (renamed from docs/modules/ROOT/images/embassy_irq.png)bin134158 -> 134158 bytes
-rw-r--r--docs/index.adoc16
-rw-r--r--docs/modules/ROOT/examples/basic/Cargo.toml18
l---------docs/modules/ROOT/examples/examples1
-rw-r--r--docs/modules/ROOT/nav.adoc19
-rw-r--r--docs/pages/basic_application.adoc (renamed from docs/modules/ROOT/pages/basic_application.adoc)14
-rw-r--r--docs/pages/beginners.adoc11
-rw-r--r--docs/pages/best_practices.adoc (renamed from docs/modules/ROOT/pages/best_practices.adoc)0
-rw-r--r--docs/pages/bootloader.adoc (renamed from docs/modules/ROOT/pages/bootloader.adoc)0
-rw-r--r--docs/pages/developer.adoc (renamed from docs/modules/ROOT/pages/developer.adoc)0
-rw-r--r--docs/pages/developer_stm32.adoc (renamed from docs/modules/ROOT/pages/developer_stm32.adoc)0
-rw-r--r--docs/pages/embassy_in_the_wild.adoc (renamed from docs/modules/ROOT/pages/embassy_in_the_wild.adoc)6
-rw-r--r--docs/pages/examples.adoc (renamed from docs/modules/ROOT/pages/examples.adoc)2
-rw-r--r--docs/pages/faq.adoc (renamed from docs/modules/ROOT/pages/faq.adoc)2
-rw-r--r--docs/pages/getting_started.adoc (renamed from docs/modules/ROOT/pages/getting_started.adoc)8
-rw-r--r--docs/pages/hal.adoc (renamed from docs/modules/ROOT/pages/hal.adoc)0
-rw-r--r--docs/pages/layer_by_layer.adoc (renamed from docs/modules/ROOT/pages/layer_by_layer.adoc)8
-rw-r--r--docs/pages/new_project.adoc (renamed from docs/modules/ROOT/pages/new_project.adoc)21
-rw-r--r--docs/pages/nrf.adoc (renamed from docs/modules/ROOT/pages/nrf.adoc)0
-rw-r--r--docs/pages/overview.adoc (renamed from docs/modules/ROOT/pages/index.adoc)16
-rw-r--r--docs/pages/project_structure.adoc (renamed from docs/modules/ROOT/pages/project_structure.adoc)12
-rw-r--r--docs/pages/runtime.adoc (renamed from docs/modules/ROOT/pages/runtime.adoc)0
-rw-r--r--docs/pages/sharing_peripherals.adoc (renamed from docs/modules/ROOT/pages/sharing_peripherals.adoc)0
-rw-r--r--docs/pages/stm32.adoc (renamed from docs/modules/ROOT/pages/stm32.adoc)0
-rw-r--r--docs/pages/system.adoc13
-rw-r--r--docs/pages/time_keeping.adoc (renamed from docs/modules/ROOT/pages/time_keeping.adoc)0
51 files changed, 154 insertions, 85 deletions
diff --git a/.github/ci/book.sh b/.github/ci/book.sh
new file mode 100644
index 000000000..285cdc8fa
--- /dev/null
+++ b/.github/ci/book.sh
@@ -0,0 +1,17 @@
1#!/bin/bash
2## on push branch=main
3
4set -euxo pipefail
5
6make -C docs
7
8export KUBECONFIG=/ci/secrets/kubeconfig.yml
9POD=$(kubectl -n embassy get po -l app=website -o jsonpath={.items[0].metadata.name})
10
11mkdir -p build
12mv docs/book build/book
13tar -C build -cf book.tar book
14kubectl exec $POD -- mkdir -p /usr/share/nginx/html
15kubectl cp book.tar $POD:/usr/share/nginx/html/
16kubectl exec $POD -- find /usr/share/nginx/html
17kubectl exec $POD -- tar -C /usr/share/nginx/html -xvf /usr/share/nginx/html/book.tar
diff --git a/ci.sh b/ci.sh
index 6fff1e68c..8e37b6178 100755
--- a/ci.sh
+++ b/ci.sh
@@ -171,11 +171,11 @@ cargo batch \
171 --- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9160-ns \ 171 --- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9160-ns \
172 --- build --release --manifest-path embassy-boot-rp/Cargo.toml --target thumbv6m-none-eabi \ 172 --- build --release --manifest-path embassy-boot-rp/Cargo.toml --target thumbv6m-none-eabi \
173 --- build --release --manifest-path embassy-boot-stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4 \ 173 --- build --release --manifest-path embassy-boot-stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4 \
174 --- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ 174 --- build --release --manifest-path docs/examples/basic/Cargo.toml --target thumbv7em-none-eabi \
175 --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-pac/Cargo.toml --target thumbv7em-none-eabi \ 175 --- build --release --manifest-path docs/examples/layer-by-layer/blinky-pac/Cargo.toml --target thumbv7em-none-eabi \
176 --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \ 176 --- build --release --manifest-path docs/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \
177 --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-irq/Cargo.toml --target thumbv7em-none-eabi \ 177 --- build --release --manifest-path docs/examples/layer-by-layer/blinky-irq/Cargo.toml --target thumbv7em-none-eabi \
178 --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml --target thumbv7em-none-eabi \ 178 --- build --release --manifest-path docs/examples/layer-by-layer/blinky-async/Cargo.toml --target thumbv7em-none-eabi \
179 --- build --release --manifest-path examples/nrf52840/Cargo.toml --target thumbv7em-none-eabi --out-dir out/examples/nrf52840 \ 179 --- build --release --manifest-path examples/nrf52840/Cargo.toml --target thumbv7em-none-eabi --out-dir out/examples/nrf52840 \
180 --- build --release --manifest-path examples/nrf5340/Cargo.toml --target thumbv8m.main-none-eabihf --out-dir out/examples/nrf5340 \ 180 --- build --release --manifest-path examples/nrf5340/Cargo.toml --target thumbv8m.main-none-eabihf --out-dir out/examples/nrf5340 \
181 --- build --release --manifest-path examples/nrf9160/Cargo.toml --target thumbv8m.main-none-eabihf --out-dir out/examples/nrf9160 \ 181 --- build --release --manifest-path examples/nrf9160/Cargo.toml --target thumbv8m.main-none-eabihf --out-dir out/examples/nrf9160 \
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 000000000..834802d3b
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,8 @@
1all:
2 asciidoctor -d book -D book/ index.adoc
3 cp -r images book
4
5clean:
6 rm -rf book
7
8.PHONY: all clean
diff --git a/docs/README.md b/docs/README.md
index 0bf3a6c89..94ebd7a05 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,4 +1,9 @@
1# embassy docs 1# embassy docs
2 2
3The documentation hosted at [https://embassy.dev/book](https://embassy.dev/book). Building the documentation requires 3The documentation hosted at [https://embassy.dev/book](https://embassy.dev/book). Building the documentation requires the [asciidoctor](https://asciidoctor.org/) tool, and can built running `make` in this folder:
4cloning the [embassy-book](https://github.com/embassy-rs/embassy-book) repository and following the instructions. 4
5```
6make
7```
8
9Then open the generated file `thebook/index.html`.
diff --git a/docs/antora.yml b/docs/antora.yml
deleted file mode 100644
index 9a00fa820..000000000
--- a/docs/antora.yml
+++ /dev/null
@@ -1,5 +0,0 @@
1name: ROOT
2title: Embassy
3version: dev
4nav:
5 - modules/ROOT/nav.adoc
diff --git a/docs/modules/ROOT/examples/basic/.cargo/config.toml b/docs/examples/basic/.cargo/config.toml
index 8ca28df39..8ca28df39 100644
--- a/docs/modules/ROOT/examples/basic/.cargo/config.toml
+++ b/docs/examples/basic/.cargo/config.toml
diff --git a/docs/examples/basic/Cargo.toml b/docs/examples/basic/Cargo.toml
new file mode 100644
index 000000000..d86d4a809
--- /dev/null
+++ b/docs/examples/basic/Cargo.toml
@@ -0,0 +1,18 @@
1[package]
2authors = ["Dario Nieuwenhuis <[email protected]>"]
3edition = "2018"
4name = "embassy-basic-example"
5version = "0.1.0"
6license = "MIT OR Apache-2.0"
7
8[dependencies]
9embassy-executor = { version = "0.5.0", path = "../../../embassy-executor", features = ["defmt", "integrated-timers", "arch-cortex-m", "executor-thread"] }
10embassy-time = { version = "0.3.0", path = "../../../embassy-time", features = ["defmt"] }
11embassy-nrf = { version = "0.1.0", path = "../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] }
12
13defmt = "0.3"
14defmt-rtt = "0.3"
15
16cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
17cortex-m-rt = "0.7.0"
18panic-probe = { version = "0.3", features = ["print-defmt"] }
diff --git a/docs/modules/ROOT/examples/basic/build.rs b/docs/examples/basic/build.rs
index 30691aa97..30691aa97 100644
--- a/docs/modules/ROOT/examples/basic/build.rs
+++ b/docs/examples/basic/build.rs
diff --git a/docs/modules/ROOT/examples/basic/memory.x b/docs/examples/basic/memory.x
index 9b04edec0..9b04edec0 100644
--- a/docs/modules/ROOT/examples/basic/memory.x
+++ b/docs/examples/basic/memory.x
diff --git a/docs/modules/ROOT/examples/basic/src/main.rs b/docs/examples/basic/src/main.rs
index 4412712c8..4412712c8 100644
--- a/docs/modules/ROOT/examples/basic/src/main.rs
+++ b/docs/examples/basic/src/main.rs
diff --git a/docs/examples/examples b/docs/examples/examples
new file mode 120000
index 000000000..d15735c1d
--- /dev/null
+++ b/docs/examples/examples
@@ -0,0 +1 @@
../../examples \ No newline at end of file
diff --git a/docs/modules/ROOT/examples/layer-by-layer/.cargo/config.toml b/docs/examples/layer-by-layer/.cargo/config.toml
index 3012f05dc..3012f05dc 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/.cargo/config.toml
+++ b/docs/examples/layer-by-layer/.cargo/config.toml
diff --git a/docs/modules/ROOT/examples/layer-by-layer/Cargo.toml b/docs/examples/layer-by-layer/Cargo.toml
index 943249a17..0f233eae5 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/Cargo.toml
+++ b/docs/examples/layer-by-layer/Cargo.toml
@@ -8,8 +8,8 @@ members = [
8] 8]
9 9
10[patch.crates-io] 10[patch.crates-io]
11embassy-executor = { path = "../../../../../embassy-executor" } 11embassy-executor = { path = "../../../embassy-executor" }
12embassy-stm32 = { path = "../../../../../embassy-stm32" } 12embassy-stm32 = { path = "../../../embassy-stm32" }
13 13
14[profile.release] 14[profile.release]
15codegen-units = 1 15codegen-units = 1
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml b/docs/examples/layer-by-layer/blinky-async/Cargo.toml
index 64f7e8403..64f7e8403 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml
+++ b/docs/examples/layer-by-layer/blinky-async/Cargo.toml
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs b/docs/examples/layer-by-layer/blinky-async/src/main.rs
index 004602816..004602816 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs
+++ b/docs/examples/layer-by-layer/blinky-async/src/main.rs
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-hal/Cargo.toml b/docs/examples/layer-by-layer/blinky-hal/Cargo.toml
index c15de2db2..c15de2db2 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-hal/Cargo.toml
+++ b/docs/examples/layer-by-layer/blinky-hal/Cargo.toml
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-hal/src/main.rs b/docs/examples/layer-by-layer/blinky-hal/src/main.rs
index d0c9f4907..d0c9f4907 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-hal/src/main.rs
+++ b/docs/examples/layer-by-layer/blinky-hal/src/main.rs
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-irq/Cargo.toml b/docs/examples/layer-by-layer/blinky-irq/Cargo.toml
index 9733658b6..9733658b6 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-irq/Cargo.toml
+++ b/docs/examples/layer-by-layer/blinky-irq/Cargo.toml
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-irq/src/main.rs b/docs/examples/layer-by-layer/blinky-irq/src/main.rs
index 743c9d99b..743c9d99b 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-irq/src/main.rs
+++ b/docs/examples/layer-by-layer/blinky-irq/src/main.rs
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-pac/Cargo.toml b/docs/examples/layer-by-layer/blinky-pac/Cargo.toml
index f872b94cb..f872b94cb 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-pac/Cargo.toml
+++ b/docs/examples/layer-by-layer/blinky-pac/Cargo.toml
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-pac/src/main.rs b/docs/examples/layer-by-layer/blinky-pac/src/main.rs
index 990d46cb6..990d46cb6 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-pac/src/main.rs
+++ b/docs/examples/layer-by-layer/blinky-pac/src/main.rs
diff --git a/docs/modules/ROOT/images/bootloader_flash.png b/docs/images/bootloader_flash.png
index 635783b05..635783b05 100644
--- a/docs/modules/ROOT/images/bootloader_flash.png
+++ b/docs/images/bootloader_flash.png
Binary files differ
diff --git a/docs/modules/ROOT/images/embassy_executor.drawio b/docs/images/embassy_executor.drawio
index b76587d97..b76587d97 100644
--- a/docs/modules/ROOT/images/embassy_executor.drawio
+++ b/docs/images/embassy_executor.drawio
diff --git a/docs/modules/ROOT/images/embassy_executor.png b/docs/images/embassy_executor.png
index 2a83a3adb..2a83a3adb 100644
--- a/docs/modules/ROOT/images/embassy_executor.png
+++ b/docs/images/embassy_executor.png
Binary files differ
diff --git a/docs/modules/ROOT/images/embassy_irq.drawio b/docs/images/embassy_irq.drawio
index aa439a8e6..aa439a8e6 100644
--- a/docs/modules/ROOT/images/embassy_irq.drawio
+++ b/docs/images/embassy_irq.drawio
diff --git a/docs/modules/ROOT/images/embassy_irq.png b/docs/images/embassy_irq.png
index 154d336b6..154d336b6 100644
--- a/docs/modules/ROOT/images/embassy_irq.png
+++ b/docs/images/embassy_irq.png
Binary files differ
diff --git a/docs/index.adoc b/docs/index.adoc
new file mode 100644
index 000000000..9c6150196
--- /dev/null
+++ b/docs/index.adoc
@@ -0,0 +1,16 @@
1:description: Embassy Book
2:sectanchors:
3:doctype: book
4:toc:
5:toc-placement: left
6:toclevels: 2
7:imagesdir: images
8
9# Embassy Book
10
11Welcome to the Embassy Book. The Embassy Book is for everyone who wants to use Embassy and understand how Embassy works.
12
13include::pages/overview.adoc[leveloffset = 1]
14include::pages/beginners.adoc[leveloffset = 1]
15include::pages/system.adoc[leveloffset = 1]
16include::pages/faq.adoc[leveloffset = 1]
diff --git a/docs/modules/ROOT/examples/basic/Cargo.toml b/docs/modules/ROOT/examples/basic/Cargo.toml
deleted file mode 100644
index 2c282145d..000000000
--- a/docs/modules/ROOT/examples/basic/Cargo.toml
+++ /dev/null
@@ -1,18 +0,0 @@
1[package]
2authors = ["Dario Nieuwenhuis <[email protected]>"]
3edition = "2018"
4name = "embassy-basic-example"
5version = "0.1.0"
6license = "MIT OR Apache-2.0"
7
8[dependencies]
9embassy-executor = { version = "0.5.0", path = "../../../../../embassy-executor", features = ["defmt", "integrated-timers", "arch-cortex-m", "executor-thread"] }
10embassy-time = { version = "0.3.0", path = "../../../../../embassy-time", features = ["defmt"] }
11embassy-nrf = { version = "0.1.0", path = "../../../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] }
12
13defmt = "0.3"
14defmt-rtt = "0.3"
15
16cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
17cortex-m-rt = "0.7.0"
18panic-probe = { version = "0.3", features = ["print-defmt"] }
diff --git a/docs/modules/ROOT/examples/examples b/docs/modules/ROOT/examples/examples
deleted file mode 120000
index 1929330b0..000000000
--- a/docs/modules/ROOT/examples/examples
+++ /dev/null
@@ -1 +0,0 @@
1../../../../examples \ No newline at end of file
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
deleted file mode 100644
index 44b0eddb9..000000000
--- a/docs/modules/ROOT/nav.adoc
+++ /dev/null
@@ -1,19 +0,0 @@
1* xref:getting_started.adoc[Getting started]
2** xref:basic_application.adoc[Basic application]
3** xref:project_structure.adoc[Project Structure]
4** xref:new_project.adoc[Starting a new Embassy project]
5** xref:best_practices.adoc[Best Practices]
6* xref:runtime.adoc[Executor]
7* xref::time_keeping.adoc[Time-keeping]
8* xref:sharing_peripherals.adoc[Sharing peripherals]
9* xref:hal.adoc[HAL]
10** xref:layer_by_layer.adoc[Anatomy of an async HAL]
11** xref:nrf.adoc[nRF]
12** xref:stm32.adoc[STM32]
13* xref:bootloader.adoc[Bootloader]
14
15* xref:examples.adoc[Examples]
16* xref:developer.adoc[Developer Docs]
17** xref:developer_stm32.adoc[Developer Docs: STM32]
18* xref:embassy_in_the_wild.adoc[Embassy in the wild]
19* xref:faq.adoc[Frequently Asked Questions]
diff --git a/docs/modules/ROOT/pages/basic_application.adoc b/docs/pages/basic_application.adoc
index d5aad806d..7b4ebda4f 100644
--- a/docs/modules/ROOT/pages/basic_application.adoc
+++ b/docs/pages/basic_application.adoc
@@ -1,10 +1,10 @@
1= A basic Embassy application 1= A basic Embassy application
2 2
3So you've got one of the xref:examples.adoc[examples] running, but what now? Let's go through a simple Embassy application for the nRF52 DK to understand it better. 3So you've got one of the examples running, but what now? Let's go through a simple Embassy application for the nRF52 DK to understand it better.
4 4
5== Main 5== Main
6 6
7The full example can be found link:https://github.com/embassy-rs/embassy/tree/master/docs/modules/ROOT/examples/basic[here]. 7The full example can be found link:https://github.com/embassy-rs/embassy/tree/master/docs/examples/basic[here].
8 8
9NOTE: If you’re using VS Code and rust-analyzer to view and edit the examples, you may need to make some changes to `.vscode/settings.json` to tell it which project we’re working on. Follow the instructions commented in that file to get rust-analyzer working correctly. 9NOTE: If you’re using VS Code and rust-analyzer to view and edit the examples, you may need to make some changes to `.vscode/settings.json` to tell it which project we’re working on. Follow the instructions commented in that file to get rust-analyzer working correctly.
10 10
@@ -14,7 +14,7 @@ The first thing you’ll notice are two attributes at the top of the file. These
14 14
15[source,rust] 15[source,rust]
16---- 16----
17include::example$basic/src/main.rs[lines="1..2"] 17include::../examples/basic/src/main.rs[lines="1..2"]
18---- 18----
19 19
20=== Dealing with errors 20=== Dealing with errors
@@ -23,7 +23,7 @@ Then, what follows are some declarations on how to deal with panics and faults.
23 23
24[source,rust] 24[source,rust]
25---- 25----
26include::example$basic/src/main.rs[lines="8"] 26include::../examples/basic/src/main.rs[lines="8"]
27---- 27----
28 28
29=== Task declaration 29=== Task declaration
@@ -32,7 +32,7 @@ After a bit of import declaration, the tasks run by the application should be de
32 32
33[source,rust] 33[source,rust]
34---- 34----
35include::example$basic/src/main.rs[lines="10..18"] 35include::../examples/basic/src/main.rs[lines="10..18"]
36---- 36----
37 37
38An embassy task must be declared `async`, and may NOT take generic arguments. In this case, we are handed the LED that should be blinked and the interval of the blinking. 38An embassy task must be declared `async`, and may NOT take generic arguments. In this case, we are handed the LED that should be blinked and the interval of the blinking.
@@ -47,7 +47,7 @@ We then initialize the HAL with a default config, which gives us a `Peripherals`
47 47
48[source,rust] 48[source,rust]
49---- 49----
50include::example$basic/src/main.rs[lines="20..-1"] 50include::../examples/basic/src/main.rs[lines="20..-1"]
51---- 51----
52 52
53What happens when the `blinker` task has been spawned and main returns? Well, the main entry point is actually just like any other task, except that you can only have one and it takes some specific type arguments. The magic lies within the `#[embassy_executor::main]` macro. The macro does the following: 53What happens when the `blinker` task has been spawned and main returns? Well, the main entry point is actually just like any other task, except that you can only have one and it takes some specific type arguments. The magic lies within the `#[embassy_executor::main]` macro. The macro does the following:
@@ -64,7 +64,7 @@ The project definition needs to contain the embassy dependencies:
64 64
65[source,toml] 65[source,toml]
66---- 66----
67include::example$basic/Cargo.toml[lines="9..11"] 67include::../examples/basic/Cargo.toml[lines="9..11"]
68---- 68----
69 69
70Depending on your microcontroller, you may need to replace `embassy-nrf` with something else (`embassy-stm32` for STM32. Remember to update feature flags as well). 70Depending on your microcontroller, you may need to replace `embassy-nrf` with something else (`embassy-stm32` for STM32. Remember to update feature flags as well).
diff --git a/docs/pages/beginners.adoc b/docs/pages/beginners.adoc
new file mode 100644
index 000000000..48c9f4541
--- /dev/null
+++ b/docs/pages/beginners.adoc
@@ -0,0 +1,11 @@
1= For beginners
2
3The articles in this section are primarily aimed at users new to Embassy,
4showing how to get started, how to structure your project and other best practices.
5
6include::getting_started.adoc[leveloffset = 2]
7include::basic_application.adoc[leveloffset = 2]
8include::project_structure.adoc[leveloffset = 2]
9include::new_project.adoc[leveloffset = 2]
10include::best_practices.adoc[leveloffset = 2]
11include::layer_by_layer.adoc[leveloffset = 2]
diff --git a/docs/modules/ROOT/pages/best_practices.adoc b/docs/pages/best_practices.adoc
index bfcedec06..bfcedec06 100644
--- a/docs/modules/ROOT/pages/best_practices.adoc
+++ b/docs/pages/best_practices.adoc
diff --git a/docs/modules/ROOT/pages/bootloader.adoc b/docs/pages/bootloader.adoc
index 3b0cdb182..3b0cdb182 100644
--- a/docs/modules/ROOT/pages/bootloader.adoc
+++ b/docs/pages/bootloader.adoc
diff --git a/docs/modules/ROOT/pages/developer.adoc b/docs/pages/developer.adoc
index e03ee51a8..e03ee51a8 100644
--- a/docs/modules/ROOT/pages/developer.adoc
+++ b/docs/pages/developer.adoc
diff --git a/docs/modules/ROOT/pages/developer_stm32.adoc b/docs/pages/developer_stm32.adoc
index 7c04ab1a4..7c04ab1a4 100644
--- a/docs/modules/ROOT/pages/developer_stm32.adoc
+++ b/docs/pages/developer_stm32.adoc
diff --git a/docs/modules/ROOT/pages/embassy_in_the_wild.adoc b/docs/pages/embassy_in_the_wild.adoc
index a7d63f990..76b1169bd 100644
--- a/docs/modules/ROOT/pages/embassy_in_the_wild.adoc
+++ b/docs/pages/embassy_in_the_wild.adoc
@@ -1,6 +1,6 @@
1= Embassy in the wild! 1= Embassy in the wild!
2 2
3Here are known examples of real-world projects which make use of Embassy. Feel free to link:https://github.com/embassy-rs/embassy/blob/main/docs/modules/ROOT/pages/embassy_in_the_wild.adoc[add more]! 3Here are known examples of real-world projects which make use of Embassy. Feel free to link:https://github.com/embassy-rs/embassy/blob/main/docs/pages/embassy_in_the_wild.adoc[add more]!
4 4
5* link:https://github.com/haobogu/rmk/[RMK: A feature-rich Rust keyboard firmware] 5* link:https://github.com/haobogu/rmk/[RMK: A feature-rich Rust keyboard firmware]
6** RMK has built-in layer support, wireless(BLE) support, real-time key editing support using vial, and more! 6** RMK has built-in layer support, wireless(BLE) support, real-time key editing support using vial, and more!
@@ -10,8 +10,8 @@ Here are known examples of real-world projects which make use of Embassy. Feel f
10* link:https://github.com/card-io-ecg/card-io-fw[Card/IO firmware] - firmware for an open source ECG device 10* link:https://github.com/card-io-ecg/card-io-fw[Card/IO firmware] - firmware for an open source ECG device
11** Targets the ESP32-S3 or ESP32-C6 MCU 11** Targets the ESP32-S3 or ESP32-C6 MCU
12* The link:https://github.com/lora-rs/lora-rs[lora-rs] project includes link:https://github.com/lora-rs/lora-rs/tree/main/examples/stm32l0/src/bin[various standalone examples] for NRF52840, RP2040, STM32L0 and STM32WL 12* The link:https://github.com/lora-rs/lora-rs[lora-rs] project includes link:https://github.com/lora-rs/lora-rs/tree/main/examples/stm32l0/src/bin[various standalone examples] for NRF52840, RP2040, STM32L0 and STM32WL
13** link:https://github.com/matoushybl/air-force-one[Air force one: A simple air quality monitoring system] 13* link:https://github.com/matoushybl/air-force-one[Air force one: A simple air quality monitoring system]
14*** Targets nRF52 and uses nrf-softdevice 14** Targets nRF52 and uses nrf-softdevice
15 15
16* link:https://github.com/schmettow/ylab-edge-go[YLab Edge Go] and link:https://github.com/schmettow/ylab-edge-pro[YLab Edge Pro] projects develop 16* link:https://github.com/schmettow/ylab-edge-go[YLab Edge Go] and link:https://github.com/schmettow/ylab-edge-pro[YLab Edge Pro] projects develop
17firmware (RP2040, STM32) for capturing physiological data in behavioural science research. Included so far are: 17firmware (RP2040, STM32) for capturing physiological data in behavioural science research. Included so far are:
diff --git a/docs/modules/ROOT/pages/examples.adoc b/docs/pages/examples.adoc
index c852f5205..82381a2c5 100644
--- a/docs/modules/ROOT/pages/examples.adoc
+++ b/docs/pages/examples.adoc
@@ -7,5 +7,5 @@ Main loop example
7 7
8[source,rust] 8[source,rust]
9---- 9----
10include::example$examples/std/src/bin/tick.rs[] 10include::../examples/examples/std/src/bin/tick.rs[]
11---- 11----
diff --git a/docs/modules/ROOT/pages/faq.adoc b/docs/pages/faq.adoc
index 8b1f22f6e..5f50951d8 100644
--- a/docs/modules/ROOT/pages/faq.adoc
+++ b/docs/pages/faq.adoc
@@ -2,7 +2,7 @@
2 2
3These are a list of unsorted, commonly asked questions and answers. 3These are a list of unsorted, commonly asked questions and answers.
4 4
5Please feel free to add items to link:https://github.com/embassy-rs/embassy/edit/main/docs/modules/ROOT/pages/faq.adoc[this page], especially if someone in the chat answered a question for you! 5Please feel free to add items to link:https://github.com/embassy-rs/embassy/edit/main/docs/pages/faq.adoc[this page], especially if someone in the chat answered a question for you!
6 6
7== How to deploy to RP2040 without a debugging probe. 7== How to deploy to RP2040 without a debugging probe.
8 8
diff --git a/docs/modules/ROOT/pages/getting_started.adoc b/docs/pages/getting_started.adoc
index 73cb5530d..465059922 100644
--- a/docs/modules/ROOT/pages/getting_started.adoc
+++ b/docs/pages/getting_started.adoc
@@ -137,7 +137,7 @@ If you’re still having problems, check the link:https://embassy.dev/book/dev/f
137 137
138Congratulations, you have your first Embassy application running! Here are some suggestions for where to go from here: 138Congratulations, you have your first Embassy application running! Here are some suggestions for where to go from here:
139 139
140* Read more about the xref:runtime.adoc[executor]. 140* Read more about the xref:_embassy_executor[executor].
141* Read more about the xref:hal.adoc[HAL]. 141* Read more about the xref:_hardware_abstraction_layer_hal[HAL].
142* Start xref:basic_application.adoc[writing your application]. 142* Start xref:_a_basic_embassy_application[writing your application].
143* Learn how to xref:new_project.adoc[start a new embassy project by adapting an example]. 143* Learn how to xref:_starting_a_new_project[start a new embassy project by adapting an example].
diff --git a/docs/modules/ROOT/pages/hal.adoc b/docs/pages/hal.adoc
index 14b85e1f1..14b85e1f1 100644
--- a/docs/modules/ROOT/pages/hal.adoc
+++ b/docs/pages/hal.adoc
diff --git a/docs/modules/ROOT/pages/layer_by_layer.adoc b/docs/pages/layer_by_layer.adoc
index fa419f75e..f87291c20 100644
--- a/docs/modules/ROOT/pages/layer_by_layer.adoc
+++ b/docs/pages/layer_by_layer.adoc
@@ -16,7 +16,7 @@ The blinky app using PAC is shown below:
16 16
17[source,rust] 17[source,rust]
18---- 18----
19include::example$layer-by-layer/blinky-pac/src/main.rs[] 19include::../examples/layer-by-layer/blinky-pac/src/main.rs[]
20---- 20----
21 21
22As you can see, a lot of code is needed to enable the peripheral clocks and to configure the input pins and the output pins of the application. 22As you can see, a lot of code is needed to enable the peripheral clocks and to configure the input pins and the output pins of the application.
@@ -35,7 +35,7 @@ The HAL example is shown below:
35 35
36[source,rust] 36[source,rust]
37---- 37----
38include::example$layer-by-layer/blinky-hal/src/main.rs[] 38include::../examples/layer-by-layer/blinky-hal/src/main.rs[]
39---- 39----
40 40
41As you can see, the application becomes a lot simpler, even without using any async code. The `Input` and `Output` types hide all the details of accessing the GPIO registers and allow you to use a much simpler API for querying the state of the button and toggling the LED output. 41As you can see, the application becomes a lot simpler, even without using any async code. The `Input` and `Output` types hide all the details of accessing the GPIO registers and allow you to use a much simpler API for querying the state of the button and toggling the LED output.
@@ -52,7 +52,7 @@ Given Embassy focus on async Rust (which we'll come back to after this example),
52 52
53[source,rust] 53[source,rust]
54---- 54----
55include::example$layer-by-layer/blinky-irq/src/main.rs[lines="1..57"] 55include::../examples/layer-by-layer/blinky-irq/src/main.rs[lines="1..57"]
56---- 56----
57 57
58The simple application is now more complex again, primarily because of the need to keep the button and LED states in the global scope where it is accessible by the main application loop, as well as the interrupt handler. 58The simple application is now more complex again, primarily because of the need to keep the button and LED states in the global scope where it is accessible by the main application loop, as well as the interrupt handler.
@@ -67,7 +67,7 @@ It's time to use the Embassy capabilities to its fullest. At the core, Embassy h
67 67
68[source,rust] 68[source,rust]
69---- 69----
70include::example$layer-by-layer/blinky-async/src/main.rs[] 70include::../examples/layer-by-layer/blinky-async/src/main.rs[]
71---- 71----
72 72
73The async version looks very similar to the HAL version, apart from a few minor details: 73The async version looks very similar to the HAL version, apart from a few minor details:
diff --git a/docs/modules/ROOT/pages/new_project.adoc b/docs/pages/new_project.adoc
index 320966bb6..346d9f0f8 100644
--- a/docs/modules/ROOT/pages/new_project.adoc
+++ b/docs/pages/new_project.adoc
@@ -1,17 +1,18 @@
1= Starting a new Embassy project 1= Starting a new project
2 2
3Once you’ve successfully xref:getting_started.adoc[run some example projects], the next step is to make a standalone Embassy project. 3Once you’ve successfully xref:getting_started.adoc[run some example projects], the next step is to make a standalone Embassy project.
4 4
5There are some tools for generating Embassy projects: (WIP) 5== Tools for generating Embassy projects
6 6
7==== CLI 7=== CLI
8- link:https://github.com/adinack/cargo-embassy[cargo-embassy] (STM32 and NRF) 8- link:https://github.com/adinack/cargo-embassy[cargo-embassy] (STM32 and NRF)
9 9
10==== cargo-generate 10=== cargo-generate
11- link:https://github.com/lulf/embassy-template[embassy-template] (STM32, NRF, and RP) 11- link:https://github.com/lulf/embassy-template[embassy-template] (STM32, NRF, and RP)
12- link:https://github.com/bentwire/embassy-rp2040-template[embassy-rp2040-template] (RP) 12- link:https://github.com/bentwire/embassy-rp2040-template[embassy-rp2040-template] (RP)
13 13
14But if you want to start from scratch: 14
15== Starting a project from scratch
15 16
16As an example, let’s create a new embassy project from scratch for a STM32G474. The same instructions are applicable for any supported chip with some minor changes. 17As an example, let’s create a new embassy project from scratch for a STM32G474. The same instructions are applicable for any supported chip with some minor changes.
17 18
@@ -35,7 +36,7 @@ stm32g474-example
35 36
36Looking in link:https://github.com/embassy-rs/embassy/tree/main/examples[the Embassy examples], we can see there’s a `stm32g4` folder. Find `src/blinky.rs` and copy its contents into our `src/main.rs`. 37Looking in link:https://github.com/embassy-rs/embassy/tree/main/examples[the Embassy examples], we can see there’s a `stm32g4` folder. Find `src/blinky.rs` and copy its contents into our `src/main.rs`.
37 38
38== .cargo/config.toml 39=== The .cargo/config.toml
39 40
40Currently, we’d need to provide cargo with a target triple every time we run `cargo build` or `cargo run`. Let’s spare ourselves that work by copying `.cargo/config.toml` from `examples/stm32g4` into our project. 41Currently, we’d need to provide cargo with a target triple every time we run `cargo build` or `cargo run`. Let’s spare ourselves that work by copying `.cargo/config.toml` from `examples/stm32g4` into our project.
41 42
@@ -66,7 +67,7 @@ and copying `STM32G474RETx` into `.cargo/config.toml` as so:
66runner = "probe-rs run --chip STM32G474RETx" 67runner = "probe-rs run --chip STM32G474RETx"
67---- 68----
68 69
69== Cargo.toml 70=== Cargo.toml
70 71
71Now that cargo knows what target to compile for (and probe-rs knows what chip to run it on), we’re ready to add some dependencies. 72Now that cargo knows what target to compile for (and probe-rs knows what chip to run it on), we’re ready to add some dependencies.
72 73
@@ -117,7 +118,7 @@ Finally, copy the `[profile.release]` section from the example `Cargo.toml` into
117debug = 2 118debug = 2
118---- 119----
119 120
120== rust-toolchain.toml 121=== rust-toolchain.toml
121 122
122Before we can build our project, we need to add an additional file to tell cargo to use the nightly toolchain. Copy the `rust-toolchain.toml` from the embassy repo to ours, and trim the list of targets down to only the target triple relevent for our project — in this case, `thumbv7em-none-eabi`: 123Before we can build our project, we need to add an additional file to tell cargo to use the nightly toolchain. Copy the `rust-toolchain.toml` from the embassy repo to ours, and trim the list of targets down to only the target triple relevent for our project — in this case, `thumbv7em-none-eabi`:
123 124
@@ -142,7 +143,7 @@ components = [ "rust-src", "rustfmt", "llvm-tools", "miri" ]
142targets = ["thumbv7em-none-eabi"] 143targets = ["thumbv7em-none-eabi"]
143---- 144----
144 145
145== build.rs 146=== build.rs
146 147
147In order to produce a working binary for our target, cargo requires a custom build script. Copy `build.rs` from the example to our project: 148In order to produce a working binary for our target, cargo requires a custom build script. Copy `build.rs` from the example to our project:
148 149
@@ -158,7 +159,7 @@ stm32g474-example
158 └── main.rs 159 └── main.rs
159---- 160----
160 161
161== Building and running 162=== Building and running
162 163
163At this point, we‘re finally ready to build and run our project! Connect your board via a debug probe and run: 164At this point, we‘re finally ready to build and run our project! Connect your board via a debug probe and run:
164 165
diff --git a/docs/modules/ROOT/pages/nrf.adoc b/docs/pages/nrf.adoc
index 1706087ae..1706087ae 100644
--- a/docs/modules/ROOT/pages/nrf.adoc
+++ b/docs/pages/nrf.adoc
diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/pages/overview.adoc
index 7116f357f..1b9381bfe 100644
--- a/docs/modules/ROOT/pages/index.adoc
+++ b/docs/pages/overview.adoc
@@ -1,4 +1,4 @@
1= Embassy 1= Introduction
2 2
3Embassy is a project to make async/await a first-class option for embedded development. 3Embassy is a project to make async/await a first-class option for embedded development.
4 4
@@ -56,6 +56,20 @@ For most I/O in embedded devices, the peripheral doesn't directly support the tr
56 56
57The Direct Memory Access controller (DMA) is a controller that is present in MCUs that Embassy supports, including stm32 and nrf. The DMA allows the MCU to set up a transfer, either send or receive, and then wait for the transfer to complete. With DMA, once started, no MCU intervention is required until the transfer is complete, meaning that the MCU can perform other computation, or set up other I/O while the transfer is in progress. For high I/O rates, DMA can cut the time that the MCU spends handling I/O by over half. However, because DMA is more complex to set-up, it is less widely used in the embedded community. Embassy aims to change that by making DMA the first choice rather than the last. Using Embassy, there's no additional tuning required once I/O rates increase because your application is already set-up to handle them. 57The Direct Memory Access controller (DMA) is a controller that is present in MCUs that Embassy supports, including stm32 and nrf. The DMA allows the MCU to set up a transfer, either send or receive, and then wait for the transfer to complete. With DMA, once started, no MCU intervention is required until the transfer is complete, meaning that the MCU can perform other computation, or set up other I/O while the transfer is in progress. For high I/O rates, DMA can cut the time that the MCU spends handling I/O by over half. However, because DMA is more complex to set-up, it is less widely used in the embedded community. Embassy aims to change that by making DMA the first choice rather than the last. Using Embassy, there's no additional tuning required once I/O rates increase because your application is already set-up to handle them.
58 58
59== Examples
60
61Embassy provides examples for all HALs supported. You can find them in the `examples/` folder.
62
63
64Main loop example
65
66[source,rust]
67----
68include::../examples/examples/std/src/bin/tick.rs[]
69----
70
71include::embassy_in_the_wild.adoc[leveloffset = 2]
72
59== Resources 73== Resources
60 74
61For more reading material on async Rust and Embassy: 75For more reading material on async Rust and Embassy:
diff --git a/docs/modules/ROOT/pages/project_structure.adoc b/docs/pages/project_structure.adoc
index 2adfcc1df..722ec8d9d 100644
--- a/docs/modules/ROOT/pages/project_structure.adoc
+++ b/docs/pages/project_structure.adoc
@@ -18,6 +18,7 @@ my-project
18|- rust-toolchain.toml 18|- rust-toolchain.toml
19---- 19----
20 20
21[discrete]
21== .cargo/config.toml 22== .cargo/config.toml
22 23
23This directory/file describes what platform you're on, and configures link:https://github.com/probe-rs/probe-rs[probe-rs] to deploy to your device. 24This directory/file describes what platform you're on, and configures link:https://github.com/probe-rs/probe-rs[probe-rs] to deploy to your device.
@@ -36,21 +37,27 @@ target = "thumbv6m-none-eabi" # <-change for your platform
36DEFMT_LOG = "trace" # <- can change to info, warn, or error 37DEFMT_LOG = "trace" # <- can change to info, warn, or error
37---- 38----
38 39
40[discrete]
39== build.rs 41== build.rs
40 42
41This is the build script for your project. It links defmt (what is link:https://defmt.ferrous-systems.com[defmt]?) and the `memory.x` file if needed. This file is pretty specific for each chipset, just copy and paste from the corresponding link:https://github.com/embassy-rs/embassy/tree/main/examples[example]. 43This is the build script for your project. It links defmt (what is link:https://defmt.ferrous-systems.com[defmt]?) and the `memory.x` file if needed. This file is pretty specific for each chipset, just copy and paste from the corresponding link:https://github.com/embassy-rs/embassy/tree/main/examples[example].
42 44
45[discrete]
43== Cargo.toml 46== Cargo.toml
44 47
45This is your manifest file, where you can configure all of the embassy components to use the features you need. 48This is your manifest file, where you can configure all of the embassy components to use the features you need.
46 49
47==== Features 50[discrete]
48===== Time 51=== Features
52
53[discrete]
54==== Time
49- tick-hz-x: Configures the tick rate of `embassy-time`. Higher tick rate means higher precision, and higher CPU wakes. 55- tick-hz-x: Configures the tick rate of `embassy-time`. Higher tick rate means higher precision, and higher CPU wakes.
50- defmt-timestamp-uptime: defmt log entries will display the uptime in seconds. 56- defmt-timestamp-uptime: defmt log entries will display the uptime in seconds.
51 57
52...more to come 58...more to come
53 59
60[discrete]
54== memory.x 61== memory.x
55 62
56This file outlines the flash/ram usage of your program. It is especially useful when using link:https://github.com/embassy-rs/nrf-softdevice[nrf-softdevice] on an nRF5x. 63This file outlines the flash/ram usage of your program. It is especially useful when using link:https://github.com/embassy-rs/nrf-softdevice[nrf-softdevice] on an nRF5x.
@@ -68,6 +75,7 @@ MEMORY
68} 75}
69---- 76----
70 77
78[discrete]
71== rust-toolchain.toml 79== rust-toolchain.toml
72 80
73This file configures the rust version and configuration to use. 81This file configures the rust version and configuration to use.
diff --git a/docs/modules/ROOT/pages/runtime.adoc b/docs/pages/runtime.adoc
index f2812dd7c..f2812dd7c 100644
--- a/docs/modules/ROOT/pages/runtime.adoc
+++ b/docs/pages/runtime.adoc
diff --git a/docs/modules/ROOT/pages/sharing_peripherals.adoc b/docs/pages/sharing_peripherals.adoc
index 6bcd56b01..6bcd56b01 100644
--- a/docs/modules/ROOT/pages/sharing_peripherals.adoc
+++ b/docs/pages/sharing_peripherals.adoc
diff --git a/docs/modules/ROOT/pages/stm32.adoc b/docs/pages/stm32.adoc
index 7bfc0592b..7bfc0592b 100644
--- a/docs/modules/ROOT/pages/stm32.adoc
+++ b/docs/pages/stm32.adoc
diff --git a/docs/pages/system.adoc b/docs/pages/system.adoc
new file mode 100644
index 000000000..985f92b18
--- /dev/null
+++ b/docs/pages/system.adoc
@@ -0,0 +1,13 @@
1= System description
2
3This section describes different parts of Embassy in more detail.
4
5include::runtime.adoc[leveloffset = 2]
6include::bootloader.adoc[leveloffset = 2]
7include::time_keeping.adoc[leveloffset = 2]
8include::hal.adoc[leveloffset = 2]
9include::nrf.adoc[leveloffset = 2]
10include::stm32.adoc[leveloffset = 2]
11include::sharing_peripherals.adoc[leveloffset = 2]
12include::developer.adoc[leveloffset = 2]
13include::developer_stm32.adoc[leveloffset = 2]
diff --git a/docs/modules/ROOT/pages/time_keeping.adoc b/docs/pages/time_keeping.adoc
index 17492a884..17492a884 100644
--- a/docs/modules/ROOT/pages/time_keeping.adoc
+++ b/docs/pages/time_keeping.adoc