You need a nightly Rust compiler for compiling Rust code for AVR. The correct version will be installed automatically due to the rust-toolchain.toml
file.
rustup component add rust-src
avr-gcc
is toolchain required to build binary targeting avr
xcode-select --install # if you haven't already done so
brew tap osx-cross/avr
brew install avr-gcc avrdude
sudo apt install avr-libc gcc-avr pkg-config avrdude libudev-dev build-essential
Next, install "ravedude", a tool that seamlessly integrates flashing your board into the usual cargo workflow:
cargo +stable install ravedude
export RAVEDUDE_PORT=/dev/ttyUSB1
The following command will list out the serial USB devices
ls /dev/tty* | grep usb
identify and export the device path
export RAVEDUDE_PORT=/dev/tty.usbserial-130
cd blink
cargo run --bin blink