Skip to content

ZioltZe/RustRevolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Revolution

Project Description

Embedded firmware is traditionally developed in C and C++ because of their efficiency and direct hardware access. However, these languages provide limited built-in memory safety, which can result in vulnerabilities and reliability issues in embedded systems. This work investigates the migration of existing embedded C firmware to Rust, a modern systems programming language that enforces memory safety at compile time without relying on garbage collection.

The study proposes a structured methodology for migrating existing embedded codebases to Rust using an incremental porting strategy. The proposed approach is applied to a physiological sensing platform with multiple sensors, wireless communication, and real-time data acquisition. Existing Rust libraries are used where available, while unsupported peripherals are ported through custom implementations. The work also addresses practical migration challenges, including debugging, and asynchronous execution.

The results demonstrate that Rust provides strong compile-time safety guarantees while maintaining performance comparable to, and in some cases better than, equivalent C implementations. In addition, the Rust ecosystem offers increasing support for embedded development.

By presenting the lessons learned during the migration process and defining a systematic migration methodology, this work provides insight into the feasibility of Rust as a safer alternative for embedded firmware development.

Folder Structure

Portfolio/
├── Administration/         [Administrative documents and Progress Reports]
├── Tech Report/            [Code, datasheets, images, quickstart and more]
├── Papers                  [Final Paper, Survey Paper and other Papers]
├── Presentations/          [Presentation Slides used during this thesis]
├── Resources/              [Resources used during this thesis]
├── index.html/             [This File in html format]
└── README.md               [This File]

For more information, read the ReadMe/index file inside the folders. Especially the Portfolio/Tech report/Code/index.html file.

Full Folder Structure

Portfolio/
├── Administration/         [Administrative documents and Progress Reports]
|   ├── Voortgangsverslagen/            [Progress Reports]
|   │   ├── VGV-xx-yyyymmdd.pdf                   >> Progress Report xx from dd/mm/yyyy
|   │   └── VGV-xx-Intermediate-yyyymmdd.pdf      >> Intermediate Progress Report from dd/mm/yyyy
|   ├── Gannt.gannt                     [Gannt Chart for the Work Plan]
|   ├── Risicoanalyse.pdf               [The Risk Analysis]
|   ├── Stagerooster.pdf                [The Internship Schedule]
|   ├── Thesis_Proposal.pdf             [The Thesis Proposal]
|   ├── Werkpostfiche.pdf               [The Job Sheet]
|   ├── index.html                      [Index File in html format]
|   └── README.md                       [Index File in md format]
├── Tech Report/            [Code, datasheets, images, quickstart and more]
|   ├── Datasheets/                     [All Sensor Datasheets]
|   ├── Images/                         [All Images used/created in this thesis]
|   ├── Code/                           [All code used: !Read the index file inside this folder!]
|   |   ├── All_Rust/               [Combining Sensors + Scripts + Communication]
|   |   │   ├── all_cyw_max/            > Combining CYW43 WiFi + MAX sensor
|   |   │   └── physio_edge/            > Final Rust Script
|   |   ├── Comm_Rust/              [Communication Scripts in Rust]
|   |   │   └── comm_cyw/               > CYW43 WiFi Script
|   |   ├── Quickstart/             [Quickstart scripts]
|   |   │   ├── start_bare/             > Start script for bare-metal loop system
|   |   │   ├── start_bare_cdc/         > Start script for bare-metal loop system with terminal logging
|   |   │   ├── start_embassy/          > Start script for embassy system
|   |   │   └── start_embassy_cdc/      > Start script for embassy system with terminal logging
|   |   ├── Scripts_C/              [Function Scripts in C]
|   |   │   └── script_int/             > Interrupt Timing Script, using C SDK
|   |   ├── Scripts_Rust/           [Function Scripts in Rust]
|   |   │   ├── script_cs/              > Compressive Sensing in Rust
|   |   │   ├── script_int/             > Interrupt Timing Script, using RP235x_HAL
|   |   │   └── script_int_embassy/     > Interrupt Timing Script, using Embassy
|   |   ├── Sensors_C/              [Original Sensor Firmware in C, separated]
|   |   │   ├── sensor_bmi/             > BMI323 Script
|   |   │   ├── sensor_max/             > MAX30102 Script
|   |   │   ├── sensor_mlx/             > MLX90632 Script
|   |   │   ├── sensor_pio_dma/         > PIO + DMA Script
|   |   │   └── sensor_st1/             > ST1VAFE3BX Script
|   |   ├── Sensors_Rust/           [Sensor Scripts in Rust]
|   |   │   ├── sensor_bmi/             > BMI323 Script
|   |   │   ├── sensor_bmi_embassy/     > BMI323 Script, using embassy
|   |   │   ├── sensor_max/             > MAX30102 Script
|   |   │   ├── sensor_max_embassy/     > MAX30102 Script, using embassy
|   |   │   ├── sensor_max_mlx/         > MAX30102 + MLX90632 Script
|   |   │   ├── sensor_mlx/             > MLX90632 Script
|   |   │   ├── sensor_mlx_async/       > MLX90632 Script, using embassy async I2C
|   |   │   ├── sensor_pio_dma/         > PIO + DMA Script
|   |   │   ├── sensor_sph/             > SPH0645LM4H-B Script
|   |   │   ├── sensor_sph_embassy/     > SPH0645LM4H-B Script, using embassy
|   |   │   ├── sensor_st1/             > ST1VAFE3BX Script
|   |   │   └── sensor_st1_lib/         > ST1VAFE3BX Script, using lib_st1/
|   |   ├── Sensors_Rust_Lib/       [Sensor Libraries in Rust]
|   |   │   └── lib_st1/                > ST1VAFE3BX Library
|   |   ├── Testing/                [Testing Scripts]
|   |   ├── index.html              [Index File in html format]
|   |   └── README.md               [Index File in md format]
|   |   ├── generative_ai.txt               [The use of generative AI in this thesis]
|   |   ├── masterproef_voorstellen.txt     [Following Master Thesis Proposals]
|   ├── index.html                      [Index File in html format]
|   └── README.md                       [Index File in md format]
├── Papers                  [Final Paper, Survey Paper and other Papers]
|   ├── Assignments/                    [Other Paper Assignments]
|   │   ├── A1.pdf                          >> Assignment 1 from the Master Thesis Course
|   │   ├── Intermeidate.pdf                >> Intermediate Paper
|   │   └── Pitch.pdf                       >> Elevator Pitch
|   ├── Linguapolis/                    [Linguapolis Assignments]
|   │   ├── Version_x.pdf(/dockx)           >> Version x of the linguapolis assignment
|   │   └── Version_x_FB.pdf(/dockx)        >> Version x Feedback
|   ├── Paper/                          [The Final Thesis Paper]
|   │   ├── Vandenhoudt.pdf                 >> The final paper in pdf format
|   │   ├── bibliography.bib                >> The bibliography from the paper
|   │   ├── inc/                            >> The used images in the paper
|   │   └── paper.tex                       >> The Paper in tex format
|   ├── Paper_Survey/                   [The Survey Paper]
|   │   ├── Survey.pdf                      >> The final survey paper in pdf format
|   │   ├── bibliography.bib                >> The bibliography from the survey paper
|   │   └── paper.tex                       >> The Survey Paper in tex format
|   ├── index.html                      [Index File in html format]
|   └── README.md                       [Index File in md format]
├── Presentations/          [Presentation Slides used during this thesis]
|   ├── Intermediate/                   [The Intermediate Presentations]
|   │   └── Intermediate_x.pdf(/pptx)           >> Intermediate presentation x 
|   ├── Draft_Presentation.pptx         [A draft of the final presentation]
|   ├── index.html                      [Index File in html format]
|   └── README.md                       [Index File in md format]
├── Resources/              [Resources used during this thesis]
|   └── resources.bib                   >> Resources in BibTex format
├── index.html/             [This File in html format]
└── README.md               [This File]

About

My Master's Thesis about the Rust Revolution. Porting existing physiological firmware from C to Rust, developing a methodology and comparing firmwares.

Topics

Resources

Stars

Watchers

Forks

Contributors