padenot / bela-sys

Rust bindings for the Bela platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bela-sys

Crude bindings for the Bela platform, to cross-compile from a Linux or OSX host.

Higher level, more ergonomic and safe bindings are available in bela-rs, that can use this crate (but see the readme there, there are various options).

Setup

Install the right tool chain for the Beaglebone black:

rustup target add armv7-unknown-linux-gnueabihf
rustup toolchain install stable-armv7-unknown-linux-gnueabihf

With a bela board plugged in and accessible at bela.local, run:

source bela_setup_local.sh

This downloads the right linker, pulls in some required files from the board, and sets up the $PATH environment variable. This MUST be called in each terminal session that will be used to call cargo, but will only download the files once. The bela board only needs to be plugged in the first time.

Testing

This should output a sine wave at 440Hz:

cargo build --target=armv7-unknown-linux-gnueabihf --example tone
scp target/armv7-unknown-linux-gnueabihf/debug/examples/tone root@bela.local:~
ssh root@bela.local
# ...
# on the bela board
./tone

Licence

About

Rust bindings for the Bela platform

License:Other


Languages

Language:Rust 98.9%Language:Shell 1.1%