Compilation of Rust for AVR Microcontrollers (narrowed down.)
⚓ Rust 📅 2025-10-15 👤 surdeus 👁️ 7I checked this post Avr-hal on Arduino-Uno about running rust code on an AVR microcontroller. HAL just means Hardware Abstraction Layer and simplifies our process.
Steps are simple, I have it running, but I do not understand a few parts.
- Are we compiling from Rust to Assembly code for the AVR with standard rustc (just nigthly)? Using
cargo run --verbosethis seemsthe case. - Why do we need the package
avr-gccexactly ?
3rd Party Requirements are here:
A number of third party tools are required to use AVR Rust.
- avr-gcc (only used as a linker frontend)
- avr-binutils (for linker support)
- avr-libc (for device-specific runtime libraries)
- avrdude (for flashing a real AVR chip)
These should be installed by the operating system package manager.
- So this linker is somehow needed to link what shared objects to what other shared objects. Just each crate's shared object file to its dependencies —maybe to the avr-libc? Why not just
ldd?
3 posts - 1 participant
🏷️ Rust_feed