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

cargo generate #678

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- complete and rework Dma Stream API [#666]
- add `.set_count()` for QEI, add `.write_count()` for TIM [#677]
- add "Fast start" section in README [#678]

[#666]: https://github.com/stm32-rs/stm32f4xx-hal/pull/666
[#677]: https://github.com/stm32-rs/stm32f4xx-hal/pull/677
[#678]: https://github.com/stm32-rs/stm32f4xx-hal/pull/678

## [v0.17.1] - 2023-07-24

Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ crate originally started by Jorge Aparicio.
[stm32f1xx-hal]: https://github.com/stm32-rs/stm32f1xx-hal
[embedded-hal]: https://github.com/rust-embedded/embedded-hal

Setting up your project
-------
## 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 `stm32f4xx-hal` crate should be already included, so you can
use the bsp as BSP for your project.

### Manually

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-syst-blinky.rs](examples/delay-syst-blinky.rs).
Expand All @@ -103,6 +104,14 @@ We also need to tell Rust how to link our executable and how to lay out the
result in memory. To accomplish all this, copy [.cargo/config](.cargo/config.toml)
and [memory.x](memory.x) from the `stm32f4xx-hal` repository to your project and make sure the sizes match up with the datasheet. Also note that there might be different kinds of memory which are not equal; to be on the safe side only specify the size of the first block at the specified address.

### Fast start

To create empty project faster you could use `cargo generate` command. See [stm32-template](https://github.com/burrbull/stm32-template/).
```
$ cargo generate --git https://github.com/burrbull/stm32-template/
```
Note that you need to know your chip full name.

License
-------

Expand Down
Loading