aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/rust.yml2
-rw-r--r--examples/stm32wl55/.cargo/config.toml21
-rw-r--r--examples/stm32wl55/src/bin/button.rs3
3 files changed, 24 insertions, 2 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 38d9c128f..7b6f0c39b 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -88,6 +88,8 @@ jobs:
88 target: thumbv6m-none-eabi 88 target: thumbv6m-none-eabi
89 - package: examples/stm32wb55 89 - package: examples/stm32wb55
90 target: thumbv7em-none-eabihf 90 target: thumbv7em-none-eabihf
91 - package: examples/stm32wl55
92 target: thumbv7em-none-eabihf
91 - package: examples/stm32f0 93 - package: examples/stm32f0
92 target: thumbv6m-none-eabi 94 target: thumbv6m-none-eabi
93 95
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]
2build-std = ["core"]
3
4[target.'cfg(all(target_arch = "arm", target_os = "none"))']
5# replace your chip as listed in `probe-run --list-chips`
6runner = "probe-run --chip STM32WLE5JCIx"
7
8rustflags = [
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]
21target = "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;
9use embassy_stm32::{ 9use 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};
14use embedded_hal::digital::v2::{InputPin, OutputPin}; 13use embedded_hal::digital::v2::{InputPin, OutputPin};
15use example_common::*; 14use example_common::*;
@@ -20,7 +19,7 @@ use cortex_m_rt::entry;
20fn main() -> ! { 19fn 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