Skip to content

Commit 24bc38c

Browse files
Merge branch 'main' into project/agherghiceanu
2 parents 8083234 + 92009cd commit 24bc38c

371 files changed

Lines changed: 105338 additions & 1603 deletions

File tree

Some content is hidden

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

slides/lectures/fils_en/01/admin/slides.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
- 12 lectures
88
- 1 Q&A lecture for the project
99

10-
## Labs
11-
- 7 labs
10+
## Labs + Project Support
11+
- 12 labs
1212

1313
## Project
1414
- Build a hardware device running software written in Rust
@@ -23,12 +23,24 @@
2323
---
2424

2525
# Grading
26+
<style>
27+
table {
28+
font-size: 1em;
29+
}
30+
th {
31+
font-weight: bold;
32+
}
33+
td, th {
34+
padding: 6px; /* Reduce padding */
35+
}
36+
</style>
2637

2738
| Part | Description | Points |
2839
|--------|-------------|--------|
29-
| [Lecture](https://embedded-rust-101.wyliodrin.com/docs/fils_en/category/lecture) tests | You will have a test at every class with subjects from the previous class. | 1p |
30-
| [Final Lecture](https://embedded-rust-101.wyliodrin.com/docs/fils_en/category/lecture) test | You will have a test during one of the lectures in January. | 4p |
31-
| [Lab](https://embedded-rust-101.wyliodrin.com/docs/fils_en/category/lab) | Your work at every lab will be graded. | 1p |
40+
| [Lecture](https://embedded-rust-101.wyliodrin.com/docs/fils_en/category/lecture) tests | You will have a test at every class with subjects from the previous class. | 0.2p |
41+
| [Final Lecture](https://embedded-rust-101.wyliodrin.com/docs/fils_en/category/lecture) test | You will have a test during one of the lectures in May. | 1.8p |
42+
| [Lab](https://embedded-rust-101.wyliodrin.com/docs/fils_en/category/lab) | Your **presence** at every lab will be graded. | 1p |
43+
| [Lab](https://embedded-rust-101.wyliodrin.com/docs/fils_en/category/lab) Test | A final test at the lab - will scale your lab grade | 1p |
3244
| [Project](https://embedded-rust-101.wyliodrin.com/docs/fils_en/project) | You will have to design and implement a hardware device. Grading will be done for the documentation, hardware design and software development. | 3p |
33-
| Final Test | You will have to take an exam during the last week of the semester. | 2p |
45+
| Final Test | You will have to take an exam during the last week of the semester. | 4p |
3446
| **Total** | *You will need at least 4.5 points to pass the subject.* | **11p** |

slides/lectures/fils_en/01/slides.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ src: ./admin/slides.md
5959
src: ./subjects.md
6060
---
6161

62+
<!-- Rust -->
63+
64+
---
65+
src: ../../resources/rust/slides.md
66+
---
67+
6268
<!-- AGC -->
6369

6470
---

slides/lectures/fils_en/01/team.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ layout: section
55

66

77
---
8-
---
8+
99
# Our team
1010

1111
<div grid="~ cols-2 gap-2" m="t-2">
@@ -20,9 +20,14 @@ layout: section
2020

2121
## Labs
2222

23-
- Alexandru Radovici
24-
- Teodor Dicu (Hardware)
25-
- Genan Omer (Software)
23+
- Andrei Zamfir
24+
- Dănuț Aldea
25+
- Irina Bradu
26+
- Genan Omer
27+
- Cristiana Precup
28+
- Eva Cosma
29+
- Victor Lișman
30+
- Roi Bachynskyi
2631

2732
</div>
2833
</div>
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
layout: section
3+
---
4+
5+
# Why Rust
6+
7+
---
8+
9+
# Let's see some code
10+
11+
12+
<v-click>
13+
14+
15+
```c
16+
17+
#include <stdio.h>
18+
#include <stdint.h>
19+
20+
void printBinary(uint32_t num) {
21+
for (int i = 31; i >= 0; i--) {
22+
printf("%d", (num >> i) & 1);
23+
if (i % 8 == 0) printf(" ");
24+
}
25+
printf("\n");
26+
}
27+
28+
int main()
29+
{
30+
uint8_t a;
31+
uint32_t b;
32+
33+
a = 0x01;
34+
b = a << 24;
35+
36+
printBinary(a);
37+
printBinary(b);
38+
39+
return 0;
40+
}
41+
42+
```
43+
<br>
44+
45+
</v-click>
46+
47+
:: right ::
48+
49+
<v-click>
50+
51+
<br> <br>
52+
53+
#### &nbsp;&nbsp;What is the resulting value?
54+
55+
</v-click>
56+
57+
<v-click>
58+
59+
60+
> &nbsp;&nbsp; it depends on the compiler and on the architecture
61+
62+
63+
</v-click>
64+
65+
66+
<br>
67+
68+
<v-click>
69+
70+
#### &nbsp;&nbsp; Solution
71+
72+
```c
73+
b = (uint32_t) a << 24;
74+
//b will be 00000001 00000000 00000000 00000000
75+
//same result on any architecture and compiler;
76+
77+
```
78+
79+
</v-click>
80+
81+
---
82+
83+
# Variables in C
84+
85+
```c
86+
87+
#include <stdio.h>
88+
89+
int8_t, uint8_t
90+
int16_t, uint16_t
91+
int32_t, uint32_t
92+
93+
94+
```
95+
96+
<br>
97+
98+
# Variables in Rust
99+
100+
```rust
101+
u8, u16, u32, u64, u128
102+
i8, i16, i32, i64, i128
103+
usize //word size (eg - 32b for 32b processor)
104+
isize //word size (eg - 32b for 32b processor)
105+
106+
//NOTES:
107+
char // 4 bytes != u8 //UTF-8 not ASCII like in C
108+
b"str" //ASCII string
109+
"str" UTF-8 string
110+
111+
's' // char
112+
b's' // u8
113+
```
114+
115+
---
116+
117+
# Lets see how C++ is doing
118+
119+
| Link | Memory-safety issue | Why Rust prevents it |
120+
|---|---|---|
121+
| [ZDI-24-854](https://www.zerodayinitiative.com/advisories/ZDI-24-854) | Unchecked AES-key length copied into fixed stack buffer => overflow enables network-adjacent remote code execution. | Safe Rust enforces bounds checks; unchecked stack copies aren’t possible.|
122+
| [Toyota: single bit flip](https://www.eetimes.com/toyota-case-single-bit-flip-that-killed/) | Stack overflow/memory corruption can kill RTOS task, bypass fail-safes => loss of throttle control (unintended acceleration). | Rust prevents overflows/races; hardware bit-flips and logic bugs remain possible. |
123+
| [CrowdStrike RCA (Channel File 291)](https://www.crowdstrike.com/wp-content/uploads/2024/08/Channel-File-291-Incident-Root-Cause-Analysis-08.06.2024.pdf) | Template field-count mismatch caused out-of-bounds input-array read in sensor, triggering Windows system crash/BSOD.|Rust bounds-checked indexing prevents OOB reads; you get an error instead. |
124+
125+
---
126+
127+
# How do we keep C++ code functional in safety-critical applications?
128+
129+
Lots of tooling and processes
130+
131+
Coding standards / restricted subsets: MISRA C/C++, AUTOSAR C++14, SEI CERT C/C++, JSF AV C++ (plus documented deviations/waivers).
132+
133+
Static analysis & compliance checking: rule checkers + dataflow analyzers (e.g., Polyspace, Coverity/CodeSonar/Parasoft, clang-tidy) integrated in CI.
134+
135+
Compiler hardening & build gates: warnings-as-errors, stack protection, fortified libc checks / hardening bundles (e.g., _FORTIFY_SOURCE, -fstack-protector-strong, -fhardened).
136+
137+
Dynamic bug finding (test builds): sanitizers for memory/UB/races (ASan/UBSan/TSan), plus coverage-guided fuzzing (libFuzzer).
138+
139+
Safety evidence overhead: mandated reviews + traceability + V&V activities (ISO 26262 / DO-178C / IEC 61508-style workflows).
140+
141+
---
142+
143+
# Why Rust - some tech insights
144+
145+
### The tagline of Rust is No Undefined Behavior.
146+
147+
- no null reference; the Rust compiler explicitly asks developers to check
148+
this;
149+
- no implicit cast, even adding a u32 to a u8 must be casted;
150+
- safe access to shared data across threads verified at compile time;
151+
- uses type states to move runtime checks to compile time and force
152+
developers to check;
153+
- clearly defined data types, unlike i8 or u128;
154+
- safe unions, that provide a safeguard to prevent wrong interpretation
155+
of data;
156+
- clear code organization into crates and modules;
157+
- backward compatibility at crate level.
158+
159+
---
160+
161+
# Does Rust remove the need for tooling?
162+
163+
No, but it sure makes code safer and dev faster
164+
165+
Rust’s advantage is biggest in safe Rust.
166+
167+
As unsafe/FFI grows, assurance shifts back to: unsafe policy & reviews, FFI boundary correctness, sanitizers/fuzzing on risky edges, dependency/toolchain governance; plus the same ISO/DO-178 traceability & V&V.
168+
169+
[Rust in Android: move fast and fix things](https://thehackernews.com/2025/11/rust-adoption-drives-android-memory.html)
170+
171+
- A 1000x reduction in memory safety vulnerability density compared to Android’s C and C++ code
172+
- With Rust changes having a 4x lower rollback rate and spending 25% less time in code review, the safer path is now also the faster one
173+
174+
---
175+
176+
# Who supports Rust-lang
177+
178+
## Some links to read
179+
180+
[the NSA: U.S. and International Partners Issue Recommendations to Secure Software Products Through Memory Safety](https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/3608324/us-and-international-partners-issue-recommendations-to-secure-software-products/)
181+
182+
[The White House: Back to the building blocks: A path toward secure and measurable software](https://www.whitehouse.gov/wp-content/uploads/2024/02/Final-ONCD-Technical-Report.pdf)
183+
184+
185+
[How Rust went from a side project to the world’s most-loved programming language](https://www.technologyreview.com/2023/02/14/1067869/rust-worlds-fastest-growing-programming-language/)
186+
187+
[On Rust-lang adoption based on git-hub adoption](https://innovationgraph.github.com/global-metrics/programming-languages)
188+
189+
190+
[Rust developers at Google are twice as productive as C++ teams](https://www.theregister.com/2024/03/31/rust_google_c/)
191+
192+
## Some companies that are building up Rust teams in embedded:
193+
- Airbus, Ampere, Bae Systems, Boeing, Ford, General Dynamics, Hyundai, Northrop Grumman, NXP, Thales, Toyota, Volvo
21.1 KB
Loading

website/versioned_docs/version-acs_cc/project/2026/adelina_maria.alexe/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The project uses an STM32 Nucleo-U545RE-Q as the main microcontroller board, fea
5555
### Schematics
5656

5757
<!-- TODO: Add KiCad schematic exported as SVG -->
58-
<!--![Schematic](schematic.svg)-->
58+
![Schematic](images/schematic.webp)
5959

6060
### Bill of Materials
6161

website/versioned_docs/version-acs_cc/project/2026/agherghiceanu/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Started writing the documentation and modifying the source chasis to fit my comp
7070

7171
### Week 5 - 11 May
7272

73+
7374
Finalized source chasis and printed the first version in order to start test-fitting components.
7475

7576
### Week 12 - 18 May
@@ -80,6 +81,7 @@ Tested all individual components, finalized the second version of the chasis and
8081

8182
Completed and uploaded the main portion of the software, with only minor addition left if time allows. Also performed first complete assembly to confirm everything fits correctly.
8283

84+
8385
## Hardware
8486

8587
The main brain of the project is the STM32 Nucleo-U545RE-Q microcontroller provided by the PM team. This takes the input from the HM-10 Bluetooth module and processes it into a signal the i2c controller can then give to the PCA9685 Servo Driver. From there, the signal is passed on to the 8 servomotors that power our robot spider, 2 in each leg. The system is powered by a 1000mAh 7.4v LiPo 2 cell batery and will be built on a modified version of the chasis of the Sesame spider-robot linked in the link section.
@@ -131,6 +133,7 @@ The format is
131133
| [panic-probe](https://github.com/knurling-rs/probe-rs) | Panic handler | Used to catch program crashes and print the error backtrace to the terminal, making debugging much easier. |
132134
| [probe-rs](https://probe.rs/) | Debugging and flashing tool | Used to seamlessly compile, flash, and run the Rust code onto the STM32 board using the simple `cargo run` command. |
133135

136+
134137
## Links
135138

136139
<!-- Add a few links that inspired you and that you think you will use for your project -->
Lines changed: 59 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)