Skip to content

Commit

Permalink
Initial STM32WBx5 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Sep 27, 2019
1 parent 94f25b8 commit c7be9a8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub enum Device {
Stm32L4S5,
Stm32L4S7,
Stm32L4S9,
Stm32WbX5,
}

impl Device {
Expand Down Expand Up @@ -54,6 +55,7 @@ impl Device {
item!(Self::Stm32L4S5);
item!(Self::Stm32L4S7);
item!(Self::Stm32L4S9);
item!(Self::Stm32WbX5);
Ok(())
}

Expand All @@ -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.",
Expand Down Expand Up @@ -103,6 +106,7 @@ impl Device {
Self::Stm32L4S5 => "stm32l4s5",
Self::Stm32L4S7 => "stm32l4s7",
Self::Stm32L4S9 => "stm32l4s9",
Self::Stm32WbX5 => "stm32wbx5",
}
}

Expand All @@ -125,6 +129,7 @@ impl Device {
Self::Stm32L4S5 => "STM32L4S5",
Self::Stm32L4S7 => "STM32L4S7",
Self::Stm32L4S9 => "STM32L4S9",
Self::Stm32WbX5 => "STM32WBX5",
}
}

Expand All @@ -147,6 +152,7 @@ impl Device {
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => "STM32L4+ Ultra Low Power",
Self::Stm32WbX5 => "STM32WB multi-protocol wireless / bluetooth",
}
}

Expand All @@ -168,7 +174,8 @@ impl Device {
| Self::Stm32L4R9
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => "thumbv7em-none-eabihf",
| Self::Stm32L4S9
| Self::Stm32WbX5 => "thumbv7em-none-eabihf",
}
}

Expand All @@ -190,7 +197,8 @@ impl Device {
| Self::Stm32L4R9
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => 0x0800_0000,
| Self::Stm32L4S9
| Self::Stm32WbX5 => 0x0800_0000,
}
}

Expand All @@ -212,7 +220,8 @@ impl Device {
| Self::Stm32L4R9
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => 0x2000_0000,
| Self::Stm32L4S9
| Self::Stm32WbX5 => 0x2000_0000,
}
}

Expand All @@ -234,7 +243,8 @@ impl Device {
| Self::Stm32L4R9
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => &["fpu"],
| Self::Stm32L4S9
| Self::Stm32WbX5 => &["fpu"],
}
}
}

0 comments on commit c7be9a8

Please sign in to comment.