Skip to content

gamunu/arduino-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Setup

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.

Install rust-src

rustup component add rust-src

Installing avr-gcc

avr-gcc is toolchain required to build binary targeting avr

macOS

xcode-select --install # if you haven't already done so
brew tap osx-cross/avr
brew install avr-gcc avrdude

Ubuntu

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

Build and run

Set the serial port connected to the Arduino

Linux

export RAVEDUDE_PORT=/dev/ttyUSB1

macOS

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •