Added feature specification to the README

This commit is contained in:
Mattia Maldini 2019-08-02 17:46:14 +02:00 committed by GitHub
parent 51f9a490bd
commit 81d1565160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -34,6 +34,18 @@ Supported Configurations
Getting Started
---------------
The `examples` folder contains several example programs. To compile them, one must specify the target device as cargo feature:
```
$ cargo build --features=stm32f030xc
```
To use stm32f0xx-hal as a dependency in a standalone project the target device feature must be specified in the `Cargo.toml` file:
```
[dependencies]
cortex-m = "0.6.0"
cortex-m-rt = "0.6.8"
stm32f0xx-hal = {version = "0.14.1", features = ["stm32f030xc"]}
```
If you are unfamiliar with embedded development using Rust, there are a number of fantastic resources available to help.
@ -42,7 +54,6 @@ If you are unfamiliar with embedded development using Rust, there are a number o
- [Rust Embedded FAQ](https://docs.rust-embedded.org/faq.html)
- [rust-embedded/awesome-embedded-rust](https://github.com/rust-embedded/awesome-embedded-rust)
Changelog
---------