nucleo-f446re

Crates.ionucleo-f446re
lib.rsnucleo-f446re
version0.1.0
sourcesrc
created_at2022-07-17 04:30:50.942697
updated_at2022-07-17 04:30:50.942697
descriptionBoard Support Package crate for the Nucleo-F446RE board
homepage
repositoryhttps://github.com/schteve/nucleo-f446re
max_upload_size
id627089
size44,853
Steve Heindel (schteve)

documentation

README

Nucleo-F446RE

A Board Support Package (BSP) for the Nucleo F446RE development board. This board has a few basic features as well as breakout headers for daughter boards such as Arduino shields. It is a starting point to evaluate or develop basic applications for the STM32F446 product line.

This crate intends to be a beginner-friendly way to use this Nucleo board. It handles linker configuration, board initialization, and provides access to implementations of the board's features without needing to directly use a HAL. It may also be helpful as an example for learning embedded Rust with the STM32F446. For advanced applications you likely want to use the stm32f4xx-hal crate directly.

Note: this crate doesn't select the build target for your application. You can do this by copying the .cargo/config.toml in this library, or by setting the target on each build e.g. cargo run --target thumbv7em-none-eabi.

Board features

  • User LED
  • User button
  • Serial port (via the on-board ST-Link)
  • Blocking timer for delays

Examples

There are two main ways to make use of this BSP:

  • Let the BSP perform all board initialization and give you access to the board features. This is the simplest option if you don't have any other hardware connected to your board since the unused PAC peripherals are dropped.
  • You perform the board initialization and then directly instantiate the BSP features you want to use. This lets you control what happens to the rest of the PAC peripherals.

Many examples are provided to illustrate both ways of using the BSP, which can be found in the examples directory. Use a USB cable to connect the Nucleo board's debugger to the host computer, and then run an example with cargo:

cargo run --example blinky

Here, cargo run implicitly makes use of probe-run to flash, execute, and handle panic and backtrace info. You only have to install probe-run with cargo install probe-run to use this. If you prefer GDB and OpenOCD, you can change the behavior of cargo run by editing .cargo/config.toml (basic scripts for GDB and OpenOCD are provided).

Reference material

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 22

cargo fmt