2.1. Installing required third party tools

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.

Arch Linux

To install all required dependencies under Arch Linux, run

sudo pacman -S avr-gcc avr-libc avrdude

Ubuntu

To install all required dependencies under Ubuntu Linux, run

sudo apt-get install binutils gcc-avr avr-libc avrdude

Linux

If your distribution's package manager doesn't provide these tools, you can install them manually.

AVR Toolchain

The AVR toolchain is necessary for compilation, and can be downloaded for several platforms from the manufacturer's website:

https://www.microchip.com/mplab/avr-support/avr-and-arm-toolchains-c-compilers

Once you uncompress the tar.gz for your system, add the subdirectory {platform}/bin to your PATH. For example, if you uncompressed the archive to ~/Downloads/avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64/, then you'd add this to your .bashrc file:

PATH=$PATH:$HOME/Downloads/avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64/avr8-gnu-toolchain-linux_x86_64/bin/

AVRDUDE

AVRDUDE is necessary to flash your compiled binary to an AVR chip. It can be downloaded from the project website:

http://download.savannah.gnu.org/releases/avrdude/

Download and uncompress the latest version for your system, and follow the instructions in the INSTALL file.

macOS

Set up the homebrew-avr tap, then install the packages:

brew install avr-binutils avr-gcc avrdude

Note that avrdude may be installed without the homebrew-avr tap.