Jake Goulding 90730a6dd4 Lockfile churn
2019-06-09 10:39:06 -04:00
2018-11-02 22:11:30 -04:00
2018-11-10 18:11:22 -05:00
2018-11-02 22:11:30 -04:00
2018-11-02 22:11:30 -04:00
2018-11-02 22:11:30 -04:00
2019-06-09 10:39:06 -04:00
2018-11-10 18:11:22 -05:00
2018-11-02 21:35:00 -04:00
2018-11-02 22:11:30 -04:00
2018-11-02 22:11:30 -04:00

Barebones Rust and Cargo program for Arduino Uno

Features:

  1. Uses timer interrupts to blink the LED.
  2. Echos back characters sent via the built-in serial device.

The code is written completely in Rust and a small amount of assembly!

See also the official blink example, which makes use of some GCC-provided code.

High-level instructions

  1. Install avr-gcc, avrdude, and picocom. For example, using Homebrew:

    brew tap osx-cross/avr
    brew install avr-gcc avrdude picocom
    

    avr-gcc is used as the linker, avrdude uploads the finished code, and picocom is used as the serial terminal.

  2. Compile the fork of Rust with AVR support and switch to it.

  3. Configure Xargo:

    export RUST_TARGET_PATH=$(pwd)
    export XARGO_RUST_SRC=/path/to/avr-rust/src
    
  4. Build the code: make

  5. Upload the code: make program

  6. Connect the serial terminal: make connect-terminal

Languages
Rust 82.4%
Assembly 14.7%
Makefile 2.8%