Compilation of Rust for AVR Microcontrollers (narrowed down.)

I 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.

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.

  • Why do we need the package avr-gcc exactly that can not be done by our system already? ?

I think this "Compiling For AVR Without The GNU Toolchain" answers some of my questions:

At the moment, the only builtin AVR target avr-unknown-gnu-atmega328 always requires AVR-GCC, AVR-libc and AVR-binutils from the GNU project.

The LLVM LLD linker has some limited support for AVR which in the future could be leveraged to allow compiling AVR Rust binaries without the dependency on the GNU toolchain. Some work on compiler-builtins and others would also be required. At the moment, the GNU toolchain is a hard dependency.