Physical Hardware Experiments
Nov 14, 2025
Generally:
Open loop control for UAVs impossible!

Flow-Deck

uSD-deck
AI Deck


Install Rust for our target:
rustup target add thumbv7em-none-eabihf
Build official example:
Flash:
make cloadHow can we cross the language barrier?
extern C and disable name manglingExport a function written in Rust
Call the function from C
C function to import
Rust code to call that function
#![no_std]
use panic_halt as _;
extern "C" {
pub fn vTaskDelay(ticks: u32);
pub fn consolePutchar(ch: i32) -> i32;
}
fn console_print(msg: &str) {
for c in msg.as_bytes() {
unsafe{ consolePutchar(*c as i32); }
}
}
#[no_mangle]
pub extern "C" fn appMain() -> i32 {
console_print("Hello from Rust2!\n");
loop {
unsafe { vTaskDelay(1000); }
}
}sinf, cosf etc. from Cbindgen
stabilizer_types.h and only include the structs that you needNext Week
Controls lecture and Assignment 2.
?