Update instructions for device example, closes #73

This commit is contained in:
Adam Greig
2019-07-23 20:59:12 -06:00
parent 77e60809b5
commit d018974c6f
2 changed files with 12 additions and 6 deletions

View File

@@ -18,6 +18,8 @@ panic-halt = "0.2.0"
# alloc-cortex-m = "0.3.5" # alloc-cortex-m = "0.3.5"
# Uncomment for the device example. # Uncomment for the device example.
# Update `memory.x`, set target to `thumbv7em-none-eabihf` in `.cargo/config`,
# and then use `cargo build --examples device` to build it.
# [dependencies.stm32f3] # [dependencies.stm32f3]
# features = ["stm32f303", "rt"] # features = ["stm32f303", "rt"]
# version = "0.7.1" # version = "0.7.1"

View File

@@ -5,17 +5,21 @@
//! //!
//! [`svd2rust`]: https://crates.io/crates/svd2rust //! [`svd2rust`]: https://crates.io/crates/svd2rust
//! //!
//! This example depends on the [`stm32f103xx`] crate so you'll have to add it to your Cargo.toml. //! This example depends on the [`stm32f3`] crate so you'll have to
//! uncomment it in your Cargo.toml.
//! //!
//! [`stm32f103xx`]: https://crates.io/crates/stm32f103xx //! [`stm32f3`]: https://crates.io/crates/stm32f3
//! //!
//! ``` //! ```
//! $ edit Cargo.toml && tail $_ //! $ edit Cargo.toml && tail $_
//! [dependencies.stm32f103xx] //! [dependencies.stm32f3]
//! features = ["rt"] //! features = ["stm32f303", "rt"]
//! version = "0.10.0" //! version = "0.7.1"
//! ``` //! ```
//! //!
//! You also need to set the build target to thumbv7em-none-eabihf,
//! typically by editing `.cargo/config` and uncommenting the relevant target line.
//!
//! --- //! ---
#![no_main] #![no_main]
@@ -27,7 +31,7 @@ extern crate panic_halt;
use cortex_m::peripheral::syst::SystClkSource; use cortex_m::peripheral::syst::SystClkSource;
use cortex_m_rt::entry; use cortex_m_rt::entry;
use cortex_m_semihosting::hprint; use cortex_m_semihosting::hprint;
use stm32f30x::{interrupt, Interrupt, NVIC}; use stm32f3::stm32f303::{interrupt, Interrupt, NVIC};
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {