From 8d94050feddebe60122ff58fe45e655574312de4 Mon Sep 17 00:00:00 2001 From: Ruben De Smet Date: Fri, 27 Sep 2019 14:26:51 +0200 Subject: [PATCH] Initial STM32WBx5 support. https://www.st.com/en/microcontrollers-microprocessors/stm32wb-series.html --- src/device.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/device.rs b/src/device.rs index 6c0e399..f16a9b3 100644 --- a/src/device.rs +++ b/src/device.rs @@ -24,6 +24,7 @@ pub enum Device { Stm32L4S5, Stm32L4S7, Stm32L4S9, + Stm32WbX5, } impl Device { @@ -54,6 +55,7 @@ impl Device { item!(Self::Stm32L4S5); item!(Self::Stm32L4S7); item!(Self::Stm32L4S9); + item!(Self::Stm32WbX5); Ok(()) } @@ -76,6 +78,7 @@ impl Device { "stm32l4s5" => Self::Stm32L4S5, "stm32l4s7" => Self::Stm32L4S7, "stm32l4s9" => Self::Stm32L4S9, + "stm32wbx5" => Self::Stm32WbX5, _ => bail!( "unsupported device `{}`. Run `drone supported-devices` for the list of \ available options.", @@ -103,6 +106,7 @@ impl Device { Self::Stm32L4S5 => "stm32l4s5", Self::Stm32L4S7 => "stm32l4s7", Self::Stm32L4S9 => "stm32l4s9", + Self::Stm32WbX5 => "stm32wbx5", } } @@ -125,6 +129,7 @@ impl Device { Self::Stm32L4S5 => "STM32L4S5", Self::Stm32L4S7 => "STM32L4S7", Self::Stm32L4S9 => "STM32L4S9", + Self::Stm32WbX5 => "STM32WBX5", } } @@ -147,6 +152,7 @@ impl Device { | Self::Stm32L4S5 | Self::Stm32L4S7 | Self::Stm32L4S9 => "STM32L4+ Ultra Low Power", + Self::Stm32WbX5 => "STM32WB multi-protocol wireless / bluetooth", } } @@ -168,7 +174,8 @@ impl Device { | Self::Stm32L4R9 | Self::Stm32L4S5 | Self::Stm32L4S7 - | Self::Stm32L4S9 => "thumbv7em-none-eabihf", + | Self::Stm32L4S9 + | Self::Stm32WbX5 => "thumbv7em-none-eabihf", } } @@ -190,7 +197,8 @@ impl Device { | Self::Stm32L4R9 | Self::Stm32L4S5 | Self::Stm32L4S7 - | Self::Stm32L4S9 => 0x0800_0000, + | Self::Stm32L4S9 + | Self::Stm32WbX5 => 0x0800_0000, } } @@ -212,7 +220,8 @@ impl Device { | Self::Stm32L4R9 | Self::Stm32L4S5 | Self::Stm32L4S7 - | Self::Stm32L4S9 => 0x2000_0000, + | Self::Stm32L4S9 + | Self::Stm32WbX5 => 0x2000_0000, } } @@ -235,6 +244,7 @@ impl Device { | Self::Stm32L4S5 | Self::Stm32L4S7 | Self::Stm32L4S9 => &["fpu"], + Self::Stm32WbX5 => &["fpu", "wb"], } } }