Skip to content

Commit 5ef7cfc

Browse files
a few slides fixes to improve the content (#1363)
1 parent 3440bca commit 5ef7cfc

27 files changed

Lines changed: 193 additions & 183 deletions

File tree

slides/lectures/fils_en/02/slides.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ Lecture 2
3131
- Memory Mapped I/O
3232
- GPIO Peripheral
3333
- Embedded Rust Stack
34-
- `embassy-rs`
34+
- `embassy`
3535

36-
<!-- MMIO -->
36+
<!--
37+
MMIO
38+
-->
3739

3840
---
3941
src: ../../resources/mmio/slides.md

slides/lectures/fils_en/08/slides.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ src: ../../resources/mmu/slides.md
6060
---
6161
layout: two-cols
6262
---
63+
6364
# Microcontroller (MCU)
6465
Integrated in embedded systems for certain tasks
6566

@@ -70,7 +71,7 @@ Integrated in embedded systems for certain tasks
7071
- costs $0.1 - $25
7172
- uses **Memory Protection Unit**
7273

73-
<img src="./pico2w.png" class="m-5 h-30 rounded">
74+
<img src="./pico2w.png" class="m-5 h-30 rounded" style="background: white; padding: 5px">
7475

7576

7677
:: right ::

slides/lectures/fils_en/10/trusted_firmware.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Provided in SDK
7676
---
7777
layout: two-cols-header
7878
---
79+
7980
# Public Key Infrastructure
8081

8182
::left::
@@ -93,13 +94,14 @@ layout: two-cols-header
9394

9495
::right::
9596

97+
<div align="center" style="background: white; padding: 5px" class="rounded">
9698
<img src="./public_key_encryption.svg" class="rounded">
97-
98-
99+
</div>
99100

100101
---
101102
layout: two-cols-header
102103
---
104+
103105
# Digital Signatures
104106
needs a *key pair* (RSA or ECS) and a *hashing algorithm*
105107

@@ -125,7 +127,9 @@ Verifying
125127

126128
::right::
127129

130+
<div align="center" style="background: white; padding: 5px" class="rounded">
128131
<img src="./digital_signature.svg" class="rounded">
132+
</div>
129133

130134
---
131135
layout: two-cols
@@ -298,4 +302,4 @@ flowchart LR
298302
- Smart Cards
299303
- keys should never be read from the device
300304
- software in these devices should not be tampered with
301-
- JavaCard (applets are uploadable)
305+
- JavaCard (applets are uploadable)

slides/lectures/resources/adc/slides.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ for this section
1919
---
2020
layout: two-cols
2121
---
22+
2223
# ADC
2324
sampling an analog signal to an array of values
2425

@@ -35,7 +36,7 @@ sampling an analog signal to an array of values
3536

3637
:: right ::
3738

38-
<div align="center">
39+
<div align="center" style="background: white; padding: 5px" class="rounded">
3940
<img src="./sampling_values.svg" class="rounded w-150">
4041
</div>
4142

@@ -90,7 +91,7 @@ how the ADC works
9091

9192
:: right ::
9293

93-
<div align="center">
94+
<div align="center" style="background: white; padding: 5px" class="rounded">
9495
<img src="./adc.svg" class="rounded w-150">
9596
</div>
9697

@@ -131,7 +132,7 @@ $$
131132
<img src="./adc_rp2040.png" class="rounded w-150">
132133
</div>
133134

134-
<div align="center">
135+
<div align="center" style="background: white; padding: 5px" class="rounded">
135136
<img src="../rp2350/pico2w-pinout.svg" class="rounded w-80">
136137
</div>
137138

slides/lectures/resources/communication/slides.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ safely share data between tasks
5353

5454
:: right ::
5555

56-
<div align="center">
56+
<div align="center" style="background: white; padding: 5px" class="rounded">
5757
<img src="../executor/isr_executor.svg" class="rounded">
5858
</div>
5959

@@ -65,7 +65,7 @@ safely share data between tasks
6565

6666
# Blocking Mutex
6767

68-
no `.await` allowed while the mutex is held
68+
no `.await` allowed while the Blocking Mutex is held
6969

7070
```rust{1|3-5|7-14|10-14|all}
7171
use embassy_sync::blocking_mutex::Mutex;
@@ -88,7 +88,7 @@ async fn task1() {
8888
---
8989

9090
# Async Mutex
91-
`.await` is allowed while the Mutex is held, it will release the Mutex while `await`ing
91+
`.await` is allowed while the Mutex is held
9292

9393
```rust{1|3-5|7-14|10-14|all}
9494
use embassy_sync::mutex::Mutex;

slides/lectures/resources/embassy-rs/slides.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
layout: section
33
---
4-
# embassy-rs
4+
5+
# embassy
56
[Embedded Asynchronous](https://embassy.dev/)
67

78
---
@@ -80,7 +81,7 @@ async fn main(_spawner: Spawner) {
8081

8182
</div>
8283

83-
The `main` function is called by the embassy-rs framework, so it can exit.
84+
The `main` function is called by the `embassy` framework, so it can return.
8485

8586
---
8687
---
@@ -136,7 +137,6 @@ async fn main(_spawner: Spawner) {
136137

137138
````
138139

139-
---
140140
---
141141

142142
# GPIO Output
@@ -195,7 +195,7 @@ async fn main(_spawner: Spawner) {
195195

196196
</div>
197197

198-
The `main` function is called by the embassy-rs framework, so it can exit.
198+
The `main` function is called by the `embassy` framework, so it can return.
199199

200200
---
201201
---

slides/lectures/resources/exceptions/slides.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,27 @@ for this section
1919
- Section 8.2 - *Exception types+*
2020

2121
---
22-
---
22+
2323
# Processor Exceptions
2424
what happens if something does not work as required
2525

26+
<div align="center" style="background: white; padding: 5px" class="rounded">
27+
2628
![Exceptions](./exceptions.svg)
2729

30+
</div>
31+
2832
---
29-
---
33+
3034
# ARM Cortex-M Exceptions
3135
what happens if something does not work as required
3236

37+
<div align="center" style="background: white; padding: 5px" class="rounded">
38+
3339
![Exceptions](./cortex-m.svg)
3440

41+
</div>
42+
3543
---
3644

3745
# Exception (HardFault) Handling
@@ -106,12 +114,11 @@ for this section
106114
- Section 11.7 - *Lockup*
107115

108116
---
109-
---
110117

111118
# ARM Cortex-M Interrupts
112119
some hardware device notifies the MCU
113120

114-
<div align="center">
121+
<div align="center" style="background: white; padding: 5px" class="rounded">
115122
<img src="./cortex-m-nvic.svg" class="rounded w-170">
116123
</div>
117124

@@ -313,6 +320,7 @@ flowchart LR
313320
---
314321
layout: two-cols
315322
---
323+
316324
# Boot
317325

318326
<style>
@@ -375,7 +383,7 @@ The internal boot loader cannot be overwritten and assures that bricking the dev
375383

376384
:: right ::
377385

378-
<div align="center">
386+
<div align="center" style="background: white; padding: 5px" class="rounded">
379387
<img src="./flash_address.svg" class="rounded w-70">
380388
</div>
381389

slides/lectures/resources/executor/slides.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ for this section
2323
- starts the Embassy scheduler
2424
- defines the `main` task
2525
- `#[embassy_executor::task]` - defines a new task
26-
- `pool_size` -is *optional* and defines how many identical tasks can be spawned
26+
- `pool_size` -is *optional* and defines how many identical tasks can be spawned at the same time
2727
- the `main` task
2828
- initializes the the `led`
2929
- spawns the `led_blink` task (adds to the scheduler)
@@ -67,9 +67,11 @@ async fn main(spawner: Spawner) {
6767

6868
<div>
6969

70-
- unless awaited, `async` functions are not executed
70+
- unless awaited, `async` functions are not executed [^async]
7171
- tasks have to use `.await` in loops, otherwise they block the scheduler
7272

73+
[^async]: they are executed, but do not execute what you expect
74+
7375
</div>
7476

7577

@@ -98,10 +100,10 @@ async fn main(spawner: Spawner) {
98100
</div>
99101

100102
---
101-
---
103+
102104
# How it works
103105

104-
<div align="center">
106+
<div align="center" style="background: white; padding: 5px" class="rounded">
105107
<img src="./executor.svg" class="rounded">
106108
</div>
107109

@@ -114,6 +116,7 @@ async fn main(spawner: Spawner) {
114116
---
115117
layout: two-cols
116118
---
119+
117120
# Priority Tasks
118121

119122
<style>
@@ -143,7 +146,7 @@ layout: two-cols
143146
<v-click>
144147

145148
### RP2
146-
- use `SWI_IRQ_01` and `SWI_IRQ_01`
149+
- use `SWI_IRQ_0` and `SWI_IRQ_1`
147150

148151
</v-click>
149152

@@ -156,7 +159,7 @@ layout: two-cols
156159

157160
:: right ::
158161

159-
<div align="center">
162+
<div align="center" style="background: white; padding: 5px" class="rounded">
160163
<img src="./isr_executor.svg" class="rounded">
161164
</div>
162165

@@ -172,7 +175,7 @@ layout: two-cols
172175
}
173176
</style>
174177

175-
<div align="center">
178+
<div align="center" style="background: white; padding: 5px" class="rounded">
176179
<img src="./isr_executor.svg" class="rounded">
177180
</div>
178181

slides/lectures/resources/future/slides.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ for this section
1414
---
1515
layout: two-cols
1616
---
17+
1718
# Future
1819

1920
<style>
@@ -47,6 +48,8 @@ where
4748
}
4849
```
4950

51+
- simplified version of `Future`
52+
5053
:: right ::
5154

5255
```mermaid
@@ -69,8 +72,8 @@ sequenceDiagram
6972
```
7073

7174
---
72-
---
73-
# Implementing a Future
75+
76+
# Implementing a (simplified) Future
7477

7578
<div grid="~ cols-2 gap-5">
7679

@@ -216,7 +219,7 @@ async fn blink(mut led: Output<'static, PIN_X>) {
216219
}
217220
```
218221
<div v-click="1">
219-
Rust rewrites
222+
Rust (kind of) rewrites
220223

221224
```rust {1-7|1-3,7|1,4-7|8-12|13-15|all}{lines: false}
222225
struct Blink {
@@ -272,12 +275,11 @@ impl Future for Blink {
272275

273276
</div>
274277

275-
276278
---
277279

278280
# Async Rust
279281

280-
- the Rust compiler rewrites `async` function into `Future`
282+
- the Rust compiler rewrites `async` functions into `Future`s
281283
- it does not know how to execute them
282284
- executors are implemented into third party libraries
283285

@@ -299,10 +301,9 @@ fn main() -> ! {
299301
}
300302
```
301303

302-
303304
---
304-
---
305-
# Executor
305+
306+
# Simplified Executor
306307

307308
```rust {1|4-16|5-12|14,15|all}
308309
static TASKS: [Option<impl Future>; N] = [None, N];
@@ -329,7 +330,7 @@ fn executor() {
329330
- an efficient executor will not poll all the tasks, it uses a `waker` that tasks use to signal the executor
330331

331332
---
332-
---
333+
333334
# The `Future` trait
334335
that Rust provides
335336

@@ -348,10 +349,12 @@ trait Future {
348349
- `Pin` to `mut self`, which means that `self` cannot be moved
349350
- `Context` which provides the `waker`
350351
- tasks are polled only if they ask the executor (by using the `wake` function)
351-
- `embassy-rs` provides the execution engine
352+
- `embassy` provides the execution engine
352353

353354
</div>
354355

356+
<div align="center" style="background: white; padding: 5px" class="rounded">
355357
<img src="./executor_w.svg" class="rounded">
358+
</div>
356359

357360
</div>

0 commit comments

Comments
 (0)