You flash Rust firmware by building a binary for your target architecture and using probe-rs or OpenOCD to write it to the device. First, build your project for the specific target (e.g., x86_64-unknown-uefi or aarch64-unknown-none), then use the flashing tool to load the resulting binary.
# Build for your target (example: x86_64-unknown-uefi)
cargo build --release --target x86_64-unknown-uefi
# Flash using probe-rs (replace <target> and <binary> with your values)
probe-rs download --chip <CHIP_NAME> --format elf target/x86_64-unknown-uefi/release/<binary>.elf
# Alternative: Flash using OpenOCD (requires openocd.cfg)
openocd -f openocd.cfg -c "program target/x86_64-unknown-uefi/release/<binary>.elf verify reset exit"