Skip to content
Rust API for the STM32F0 micro controller
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.
.cargo Add stm32f0x2 crate generated using svd2rust. (#1) Oct 11, 2017
ci Update CI lint config. Nov 20, 2017
stm32f0_hal
stm32f0x2 Freeze cortex-m rev. Apr 6, 2018
.gitignore
.travis.yml
Cargo.toml
LICENSE Initial commit Oct 10, 2017
README.md
Xargo.toml
rustfmt.toml

README.md

Rust API for the STM32F0 micro controller

Build Status

The API is composed of two main crates:

  • the stm32f0x2 is the raw API as generated via svd2rust
  • the stm32f0_hal is a higher level API with GPIO, LED, UART, etc support

Installation

First you need to setup your environment to cross compile it for armv6. You can find good instructions for Win/Mac/Linux here.

Then you can build both workspaces directly from the root using xargo build --target thumbv6m-none-eabi.

Warning: due to some recent APIs break, you should use the nightly 25-12-2017! We will fix that real soon.

Usage

You can find examples in the stm32f0_hal/examples folder. They can be built directly.

For instance, to build the blinky example: xargo build --target thumbv6m-none-eabi --example blinky.

You can generate the doc via xargo doc for a complete API.

Troubleshoot

Xargo version

If you encounter an error such as: error: no matching version = 0.0.0 found for package compiler_builtins (required by sysroot)

Make sure you downgrade your xargo version to 0.3.8: cargo install xargo --vers 0.3.8 -f

You can’t perform that action at this time.