Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README template for stm32yyxx-hal crates #1

Open
marcoieni opened this issue Jun 17, 2020 · 0 comments
Open

README template for stm32yyxx-hal crates #1

marcoieni opened this issue Jun 17, 2020 · 0 comments

Comments

@marcoieni
Copy link

marcoieni commented Jun 17, 2020

At the moment every hal crate (i.e. l4xx, f4xx and so on) has its own README format.

we should define a standard template.

For example:

# stm32yyxx-hal

[![Crates.io](https://img.shields.io/crates/v/stm32yyxx-hal.svg)](https://crates.io/crates/stm32yyxx-hal)
[![Docs](https://docs.rs/stm32yyxx-hal/badge.svg)](https://docs.rs/stm32yyxx-hal)

## About

- Minimum rustc version 1.xx

## Setting up your project

Check if the BSP for your board exists in the
[stm32-rs](https://github.com/stm32-rs) page.
If it exists, the `stm32yyxx-hal` crate should be already included, so you can
use the bsp as BSP for your project.

Otherwise, create a new Rust project as you usually do with `cargo init`. The
"hello world" of embedded development is usually to blink a LED. The code to do
so is available in [examples/delay-blinky.rs](examples/delay-blinky.rs).
Copy that file to the `main.rs` of your project.

You also need to add some dependencies to your `Cargo.toml`:

toml
[dependencies]
embedded-hal = "0.2"
nb = "0.1.2"
cortex-m = "0.6"
cortex-m-rt = "0.6"
# Panic behaviour, see https://crates.io/keywords/panic-impl for alternatives
panic-halt = "0.2"

[dependencies.stm32yyxx-hal]
version = "0.8"
features = ["rt", "stm32yyxx"] # replace the model of your microcontroller here


## License

I will not go more in detail because defining the template in this issue is not very convenient. Let's just choose the path of this file I will make a pull request where we talk about it.
I propose: hal_template/README.md
In the future in this directory I would like to place also template for issues and pull requests, contributing guidelines, github actions and so on.

EDIT: we could also create a template repository instead of a subdirectory of this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant