From 919cdfe8c4afa9ebb3e6d9238d32bbd856adb040 Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Wed, 18 Aug 2021 09:35:08 +0200 Subject: [PATCH] Add STM32WL55 examples to CI (#361) * Add STM32WL55 examples to CI and fix warnings --- .github/workflows/rust.yml | 2 ++ examples/stm32wl55/.cargo/config.toml | 21 +++++++++++++++++++++ examples/stm32wl55/src/bin/button.rs | 3 +-- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 examples/stm32wl55/.cargo/config.toml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 38d9c128..7b6f0c39 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -88,6 +88,8 @@ jobs: target: thumbv6m-none-eabi - package: examples/stm32wb55 target: thumbv7em-none-eabihf + - package: examples/stm32wl55 + target: thumbv7em-none-eabihf - package: examples/stm32f0 target: thumbv6m-none-eabi diff --git a/examples/stm32wl55/.cargo/config.toml b/examples/stm32wl55/.cargo/config.toml new file mode 100644 index 00000000..255f399f --- /dev/null +++ b/examples/stm32wl55/.cargo/config.toml @@ -0,0 +1,21 @@ +[unstable] +build-std = ["core"] + +[target.'cfg(all(target_arch = "arm", target_os = "none"))'] +# replace your chip as listed in `probe-run --list-chips` +runner = "probe-run --chip STM32WLE5JCIx" + +rustflags = [ + # LLD (shipped with the Rust toolchain) is used as the default linker + "-C", "link-arg=--nmagic", + "-C", "link-arg=-Tlink.x", + "-C", "link-arg=-Tdefmt.x", + + # Code-size optimizations. + "-Z", "trap-unreachable=no", + "-C", "inline-threshold=5", + "-C", "no-vectorize-loops", +] + +[build] +target = "thumbv7em-none-eabihf" diff --git a/examples/stm32wl55/src/bin/button.rs b/examples/stm32wl55/src/bin/button.rs index 90212d3d..84e1f599 100644 --- a/examples/stm32wl55/src/bin/button.rs +++ b/examples/stm32wl55/src/bin/button.rs @@ -9,7 +9,6 @@ mod example_common; use embassy_stm32::{ dbgmcu::Dbgmcu, gpio::{Input, Level, Output, Pull, Speed}, - rcc::*, }; use embedded_hal::digital::v2::{InputPin, OutputPin}; use example_common::*; @@ -20,7 +19,7 @@ use cortex_m_rt::entry; fn main() -> ! { info!("Hello World!"); - let mut p = embassy_stm32::init(Default::default()); + let p = embassy_stm32::init(Default::default()); unsafe { Dbgmcu::enable_all() };