diff --git a/src/device.rs b/src/device.rs index fbbef2a..d5123b3 100644 --- a/src/device.rs +++ b/src/device.rs @@ -42,6 +42,7 @@ pub enum Device { Stm32L4S5, Stm32L4S7, Stm32L4S9, + Stm32Wbx5, } impl Device { @@ -110,6 +111,8 @@ impl Device { item!(Self::Stm32L4S5); item!(Self::Stm32L4S7); item!(Self::Stm32L4S9); + family!("STM32WB multi-protocol wireless / bluetooth"); + item!(Self::Stm32Wbx5); Ok(()) } @@ -146,8 +149,9 @@ impl Device { | Self::Stm32L4R9 | Self::Stm32L4S5 | Self::Stm32L4S7 - | Self::Stm32L4S9 => "thumbv7em-none-eabihf", - } + | Self::Stm32L4S9 + | Self::Stm32Wbx5 => "thumbv7em-none-eabihf", + } } /// Returns the origin of the Flash memory. @@ -180,7 +184,8 @@ impl Device { | Self::Stm32L4R9 | Self::Stm32L4S5 | Self::Stm32L4S7 - | Self::Stm32L4S9 => 0x0800_0000, + | Self::Stm32L4S9 + | Self::Stm32Wbx5 => 0x0800_0000, } } @@ -217,7 +222,8 @@ impl Device { | Self::Stm32L4R9 | Self::Stm32L4S5 | Self::Stm32L4S7 - | Self::Stm32L4S9 => 0x2000_0000, + | Self::Stm32L4S9 + | Self::Stm32Wbx5 => 0x2000_0000, } } @@ -251,7 +257,8 @@ impl Device { | Self::Stm32L4R9 | Self::Stm32L4S5 | Self::Stm32L4S7 - | Self::Stm32L4S9 => Some(4_000_000), + | Self::Stm32L4S9 + | Self::Stm32Wbx5 => Some(4_000_000), } } @@ -288,7 +295,8 @@ impl Device { | Self::Stm32L4R9 | Self::Stm32L4S5 | Self::Stm32L4S7 - | Self::Stm32L4S9 => (crates::Platform::CortexM, "cortex_m4f_r0p1", &["fpu"]), + | Self::Stm32L4S9 + | Self::Stm32Wbx5 => (crates::Platform::CortexM, "cortex_m4f_r0p1", &["fpu"]), } } @@ -380,6 +388,7 @@ impl Device { Self::Stm32L4S9 => (crates::Bindings::Stm32, "stm32l4s9", &[ "adc", "dma", "exti", "gpio", "i2c", "rtc", "spi", "tim", "uart", ]), + Self::Stm32Wbx5 => (crates::Bindings::Stm32, "stm32wbx5", &[]), } } @@ -414,6 +423,7 @@ impl Device { | Self::Stm32L4S5 | Self::Stm32L4S7 | Self::Stm32L4S9 => &[Probe::Bmp, Probe::Openocd], + Self::Stm32Wbx5 => &[Probe::Openocd], } } @@ -450,6 +460,7 @@ impl Device { | Self::Stm32L4S5 | Self::Stm32L4S7 | Self::Stm32L4S9 => &["target/stm32l4x.cfg"], + Self::Stm32Wbx5 => &["target/stm32wbx.cfg"], } } }