Skip to content

gauteh/swan-stm32l4r5-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust on STM32L4R5 (or the Blues.io Swan) Quick Demo

This repository contains everything needed to flash an LED on an STM32L4R5. And is tested on the Blues Wireless Swan.

It shows how to set up a project to build for the Cortex-M4 core.

This demo uses an STM32L4R5 specifically, but should be easy to port to another STM32L4. See the Porting section below for information.

Trying It Out

First make sure your Rust is set up. Install rustup if you haven't already, and install the latest stable Rust. Then ensure you have added the required thumbv7 target:

$ rustup target add thumbv7em-none-eabihf

Now you can download this repository and build it:

$ git clone https://github.com/gauteh/swan-stm32l4r5-quickstart
$ cd swan-stm32l4r5-quickstart
$ cargo build --release

The ELF binary file is in target/thumbv7em-none-eabihf/release/swan-stm32l4r5-quickstart. For information on how to program it on your target, consult the embedded Rust docs.

If you have a debug probe, like the STLINK-V3MINI, you can run the project with:

$ cargo run

Porting to another STM32L4

See the instructions for the STM32F4 demo.

License

MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Credits

Repository modeled after: https://github.com/adamgreig/stm32f4-demo

Releases

No releases published

Packages

No packages published