Skip to content

Commit

Permalink
Cargo Metadata (#14)
Browse files Browse the repository at this point in the history
* fixing rt feature build

* improving readme and cargo metadata

* expanding rust workflow
  • Loading branch information
lucasbrendel authored and probot-auto-merge[bot] committed Oct 21, 2019
1 parent c0e15fa commit 9bd3aef
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Rust

on:
pull_request:
push:
branches:
- master

Expand Down
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ authors = ["Lucas Brendel <[email protected]>"]
readme = "README.md"
repository = "https://github.com/xmc-rs/xmc4300"
license = "MIT"
keywords = ["cortex-m", "infineon", "arm", "xmc4x"]
keywords = ["cortex-m", "xmc4x", "embedded", "svd2rust", "no_std"]
documentation = "https://docs.rs/xmc4300/"
categories = ["embedded", "no-std"]

[dependencies]
cortex-m = "0.6.1"
Expand All @@ -19,4 +20,7 @@ optional = true
version = "0.6.10"

[features]
rt = ["cortex-m-rt/device"]
rt = ["cortex-m-rt/device"]

[package.metadata.docs.rs]
features = ["rt"]
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
# xmc4300
XMC4300 Peripheral interface library generated from an SVD

## WARNING
> THIS IS A WORK IN PROGRESS AND MUCH IS UNTESED
[![crates.io](https://img.shields.io/crates/v/xmc4300.svg)](https://crates.io/crates/xmc4300)
[![rust](https://github.com/xmc-rs/xmc4300/workflows/Rust/badge.svg)](https://github.com/xmc-rs/xmc4300/workflows/Rust/badge.svg)

This is a 'peripheral access crate' for interfacing to the XMC4300 series of microcontrollers for embedded support in Rust that is generated using [svd2rust](https://docs.rs/svd2rust) and an SVD file provided by Infineon.

There is an optional `rt` that can be utilized. An explanation of the feature is given by [svd2rust](https://docs.rs/svd2rust/0.16.1/svd2rust/#the-rt-feature)

All API's and usage (besides what registers exist) are defined by [svd2rust](https://docs.rs/svd2rust)

## Generate Crate from SVD

```bash
# Necessary 3rd-party tools
cargo install svd2rust
cargo install form
rustup component add rustfmt

svd.sh # Generates code from crate and formats to rustfmt
```

The inclusion of EtherCAT has been removed from `src/lib.rs`. This is due to an issue either with the SVD file or the generation of the code using svd2rust. There is no support at this time until a fix can be made. This has not been tested on hardware to ensure that nothing else has been impacted.

## Using Crate

```toml
[dependencies.xmc4300]
version = "0.1.1"
features = ["rt"]
```

0 comments on commit 9bd3aef

Please sign in to comment.