diff options
Diffstat (limited to 'examples/stm32wl55')
| -rw-r--r-- | examples/stm32wl55/.cargo/config.toml | 21 | ||||
| -rw-r--r-- | examples/stm32wl55/src/bin/button.rs | 3 |
2 files changed, 22 insertions, 2 deletions
diff --git a/examples/stm32wl55/.cargo/config.toml b/examples/stm32wl55/.cargo/config.toml new file mode 100644 index 000000000..255f399fb --- /dev/null +++ b/examples/stm32wl55/.cargo/config.toml | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | [unstable] | ||
| 2 | build-std = ["core"] | ||
| 3 | |||
| 4 | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] | ||
| 5 | # replace your chip as listed in `probe-run --list-chips` | ||
| 6 | runner = "probe-run --chip STM32WLE5JCIx" | ||
| 7 | |||
| 8 | rustflags = [ | ||
| 9 | # LLD (shipped with the Rust toolchain) is used as the default linker | ||
| 10 | "-C", "link-arg=--nmagic", | ||
| 11 | "-C", "link-arg=-Tlink.x", | ||
| 12 | "-C", "link-arg=-Tdefmt.x", | ||
| 13 | |||
| 14 | # Code-size optimizations. | ||
| 15 | "-Z", "trap-unreachable=no", | ||
| 16 | "-C", "inline-threshold=5", | ||
| 17 | "-C", "no-vectorize-loops", | ||
| 18 | ] | ||
| 19 | |||
| 20 | [build] | ||
| 21 | target = "thumbv7em-none-eabihf" | ||
diff --git a/examples/stm32wl55/src/bin/button.rs b/examples/stm32wl55/src/bin/button.rs index 90212d3d7..84e1f599f 100644 --- a/examples/stm32wl55/src/bin/button.rs +++ b/examples/stm32wl55/src/bin/button.rs | |||
| @@ -9,7 +9,6 @@ mod example_common; | |||
| 9 | use embassy_stm32::{ | 9 | use embassy_stm32::{ |
| 10 | dbgmcu::Dbgmcu, | 10 | dbgmcu::Dbgmcu, |
| 11 | gpio::{Input, Level, Output, Pull, Speed}, | 11 | gpio::{Input, Level, Output, Pull, Speed}, |
| 12 | rcc::*, | ||
| 13 | }; | 12 | }; |
| 14 | use embedded_hal::digital::v2::{InputPin, OutputPin}; | 13 | use embedded_hal::digital::v2::{InputPin, OutputPin}; |
| 15 | use example_common::*; | 14 | use example_common::*; |
| @@ -20,7 +19,7 @@ use cortex_m_rt::entry; | |||
| 20 | fn main() -> ! { | 19 | fn main() -> ! { |
| 21 | info!("Hello World!"); | 20 | info!("Hello World!"); |
| 22 | 21 | ||
| 23 | let mut p = embassy_stm32::init(Default::default()); | 22 | let p = embassy_stm32::init(Default::default()); |
| 24 | 23 | ||
| 25 | unsafe { Dbgmcu::enable_all() }; | 24 | unsafe { Dbgmcu::enable_all() }; |
| 26 | 25 | ||
