Rust and Cargo program for Arduino Uno
Features:
- Uses timer interrupts to blink the LED.
- Echos back characters sent via the built-in serial device.
- Echos back characters sent via the built-in serial device using futures.
The code is written completely in Rust and a small amount of assembly! We avoid using any of the GCC startup files.
See the official blink example, which makes use of some GCC-provided code.
High-level instructions
-
Follow the official instructions to install
avr-gcc
andavrdude
. Additionally install picocom. For example, using Homebrew:brew install picocom
avr-gcc
is used as the linker,avrdude
uploads the finished code, and picocom is used as the serial terminal. -
Build the code:
make
-
Upload the code:
make program
-
Connect the serial terminal:
make connect-terminal