#bsp #nucleo #stm32 #arm #cortex-m

no-std nucleo-f446re

Board Support Package crate for the Nucleo-F446RE board

1 unstable release

0.1.0 Jul 17, 2022

#8 in #nucleo

43 downloads per month

MIT/Apache

16KB
169 lines

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.

Dependencies

~53MB
~1.5M SLoC