Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
stm32f1xx-hal
HAL for the STM32F1 family of microcontrollers
Usage
This crate supports multiple microcontrollers in the
stm32f1 family. Which specific microcontroller you want to build for has to be
specified with a feature, for example stm32f103
.
If no microcontroller is specified, the crate will not compile.
You may also need to specify the density of the device with medium
, high
or xl
to enable certain peripherals. Generally the density can be determined by the 2nd character
after the number in the device name (i.e. For STM32F103C6U, the 6 indicates a low-density
device) but check the datasheet or CubeMX to be sure.
- 4, 6 => low density, no feature required
- 8, B =>
medium
feature - C, D, E =>
high
feature - F, G =>
xl
feature
Supported Microcontrollers
stm32f100
stm32f101
stm32f103
Trying out the examples
You may need to give cargo
permission to call gdb
from the working directory.
- Linux
- Windows
echo set auto-load safe-path %CD% >> %USERPROFILE%\.gdbinit
Compile, load, and launch the hardware debugger.
# on another terminal
# flash and debug the "Hello, world" example. Change stm32f103 to match your hardware
$INTERFACE
should be set based on your debugging hardware. If you are using
an stlink V2, use stlink-v2.cfg
. For more information, see the
embeddonomicon.
Using as a Dependency
When using this crate as a dependency in your project, the microcontroller can
be specified as part of the Cargo.toml
definition.
[]
= "0.5.1"
= ["stm32f100", "rt"]
Blinky example
The following example blinks an LED connected to pin PC13. For instructions on how set up a project and run the example, see the documentation. For more examples, see the examples directory.
extern crate panic_halt;
use block;
use ;
use entry;
!
Documentation
The documentation can be found at docs.rs.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.