Skip to content
Programming Tessel in Rust
Rust Assembly Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
arm.rs
blinky.rs
build.sh
lpc1800.rs
lpc18xx-startup.s
reg.rs
support.rs
tessel-ram.ld
thumbv7m-none-eabi.json

README.md

Rust on Tessel

Rust is a new systems programming language emphasizing safety, concurrency, and speed. It requires no runtime, so it's suitable to use as a better C for microcontroller development. This is a simple demo running Rust on bare metal on a Tessel, which uses a NXP LPC1800 microcontroller with an ARM Cortex M3 core.

The standard Rust compiler is capable of cross-compiling for ARM. See the Rust Guide for installation instructions, as well as learning the language.

You'll also need a copy of gcc-arm-embedded. We won't use its C compiler, but it includes an assembler, linker, and binutils.

Clone this repository:

git clone https://github.com/kevinmehall/rust-tessel
cd rust-tessel

You need a copy of Rust's libcore compiled for ARM, so clone the rust repository and build the library:

git clone https://github.com/rust-lang/rust
rustc -O --target=thumbv7m-linux-eabi rust/src/libcore/lib.rs

I've wrapped the commands to compile, link, and produce a binary image into build.sh script

./build.sh blinky.rs

Use the Tessel bootloader to run the executable:

tessel boot blinky.bin

It runs from RAM, so press the Reset button to return to normal Tessel firmware.

You can’t perform that action at this time.