-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixing rt feature build * improving readme and cargo metadata * expanding rust workflow
- Loading branch information
1 parent
c0e15fa
commit 9bd3aef
Showing
3 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ name: Rust | |
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
``` |