Skip to content

ASteinheiser/rust-cross-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-cross-pi

Rust code to be cross compiled from a Mac for running on a Raspi. Contains an LED blink demo (GPIO) and a fibonacci speed test.

Install Cross Compiling Tools

# Pi
rustup target add armv7-unknown-linux-gnueabihf
# Pi 0
rustup target add arm-unknown-linux-gnueabihf
git clone [email protected]:rust-embedded/cross.git
cd cross
cargo build --release

Compile Release for Pi from Mac

  • Ensure Docker is running
  • Run the build command
~/Projects/cross/target/release/cross build --release --target=armv7-unknown-linux-gnueabihf

Run code on Pi stack at HeatSync

  • Copy files to your Pi
scp target/armv7-unknown-linux-gnueabihf/release/rust-cross-pi [email protected]:/home/pi
  • SSH into the Pi
  • If using LED Blink demo, simply run the command
./rust-cross-pi
  • If using fibonacci speed test, run command with a number argument. This will be the seed for the fibonacci algorithm
./rust-cross-pi 30

pi-stack

About

Rust code to be cross compiled for running on a Raspi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages