Skip to content

tkellogg/dueboot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dueboot

Infrastructure for programming an Arduino Due in the Rust programming language. This includes a sample sketch that can be modified to do most any other sketch.

Compiling

Install the prerequisites:

Then modify Rakefile:

  1. ARDUINO points to the directory in the Arduino Due installation that has tools to flash the device. Should contain arm-none-eabi-ar and arm-none-eabi-objcopy among other executables.
  2. RUSTC points to the rustc executable (the Rust compiler).
  3. LLC points to the LLVM compiler executable called llc.
  4. PORT is the name of the USB connection. Do an ls /dev/tty* to get a list of options. Most likely something like tty.usbmodem141.
  5. RUST_SRC is the name of the *.rs file that contains the main function for your sketch.

Then run rake burn to upload to the Arduino.

Here is a circuit diagram of the Arduino sketch:

Circuit diagram

Structure

core.rs - sample program (blinks 4 LEDs in series like Christmas lights with a potentiometer to control the speed).
          Feel free to change the program & circuit as you wish.
arduino.rs - extern stubs for the core Arduino libraries
hardware/ - from a random Arduino IDE for OS X

Credits

About

Rust on the Arduino Due

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 84.0%
  • C++ 13.0%
  • Objective-C 0.9%
  • Other 0.8%
  • Assembly 0.6%
  • Shell 0.4%
  • Other 0.3%