A fork of dvhdr's launchpad-pro project to enable writing open source firmware for the Launchpad Pro in Rust.
First you'll need Rust installed which you can get at rustup.rs. You will also need Homebrew.
We need to install the cross compilation target for the Launchpad Pro:
$ rustup target add thumbv7m-none-eabi
The following commands will install cargo-binutils. This lets us transform our Cargo output (ELF) into hex format.
$ cargo install cargo-binutils
$ rustup component add llvm-tools-preview
We also need to install cargo-make. This lets us define the tasks and flow for creating the SysEx file that we can upload to the Launchpad Pro.
$ cargo install cargo-make
Finally we need to install the GCC ARM toolchain using Homebrew.
$ brew install armmbed/formulae/arm-none-eabi-gcc
By default Cargo will build your project for the host machine. This means we can use an std
environment for running our tests.
We can build our project by running:
$ cargo build
And as expected we can test our project by running:
$ cargo test
You will need to build your project as a SysEx file in order to upload it to the Launchpad Pro. To do this run:
$ cargo sysex --bin main
This will create the firmware image, app.syx
, in the build
directory. This can then be uploaded to the Launchpad Pro. Consult the guide from the original repository on how to do this.
A simple example application can be found in the examples
directory to help you get started.
An implementation of Conway's Game of Life. To build it for the Launchpad Pro run:
$ cargo sysex --example life
Pressing buttons on the grid will create new life! You can pause/resume the simulation by pressing the Setup button.
To open the HAL documentation in your favourite browser run:
$ cargo doc --open