Skip to content

Commit

Permalink
Initial STM32WBx5 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos authored and Vanarill committed Feb 10, 2020
1 parent f572e58 commit df84a5a
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub enum Device {
Stm32L4S5,
Stm32L4S7,
Stm32L4S9,
Stm32Wbx5,
}

impl Device {
Expand Down Expand Up @@ -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(())
}

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -180,7 +184,8 @@ impl Device {
| Self::Stm32L4R9
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => 0x0800_0000,
| Self::Stm32L4S9
| Self::Stm32Wbx5 => 0x0800_0000,
}
}

Expand Down Expand Up @@ -217,7 +222,8 @@ impl Device {
| Self::Stm32L4R9
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => 0x2000_0000,
| Self::Stm32L4S9
| Self::Stm32Wbx5 => 0x2000_0000,
}
}

Expand Down Expand Up @@ -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),
}
}

Expand Down Expand Up @@ -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"]),
}
}

Expand Down Expand Up @@ -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", &[]),
}
}

Expand Down Expand Up @@ -414,6 +423,7 @@ impl Device {
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => &[Probe::Bmp, Probe::Openocd],
Self::Stm32Wbx5 => &[Probe::Openocd],
}
}

Expand Down Expand Up @@ -450,6 +460,7 @@ impl Device {
| Self::Stm32L4S5
| Self::Stm32L4S7
| Self::Stm32L4S9 => &["target/stm32l4x.cfg"],
Self::Stm32Wbx5 => &["target/stm32wbx.cfg"],
}
}
}

0 comments on commit df84a5a

Please sign in to comment.