From 8824202c5ac8a6afb3a328c90259b69d472b33e2 Mon Sep 17 00:00:00 2001 From: Nils Fitinghoff Date: Mon, 2 Oct 2023 16:17:39 +0200 Subject: rtic-monotonics: Fix stm32-metapac use Previously, the stm32 monotonics only compiled for some chip families. For example, stm32g081kb worked, but not stm32f407*. The stm32-metapac does not directly unify peripheral names between the many stm32 families, but provides tools for build scripts to generate code that uses the right names for the selected chip. Use that mechanism instead of targeting a specific family. --- rtic-monotonics/Cargo.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'rtic-monotonics/Cargo.toml') diff --git a/rtic-monotonics/Cargo.toml b/rtic-monotonics/Cargo.toml index e8197db..1d9138d 100644 --- a/rtic-monotonics/Cargo.toml +++ b/rtic-monotonics/Cargo.toml @@ -43,7 +43,12 @@ nrf5340-net-pac = { version = "0.12.2", optional = true } nrf9160-pac = { version = "0.12.2", optional = true } # STM32 -stm32-metapac = { version = "14.0.0", features = ["metadata"], optional = true } +stm32-metapac = { version = "14.0.0", optional = true } + +[build-dependencies] +proc-macro2 = { version = "1.0.36", optional = true } +quote = { version = "1.0.15", optional = true } +stm32-metapac = { version = "14.0.0", default-features = false, features = ["metadata"], optional = true } [features] default = [] @@ -78,6 +83,8 @@ stm32_tim5 = [] stm32_tim12 = [] stm32_tim15 = [] +stm32-metapac = ["dep:stm32-metapac", "dep:quote", "dep:proc-macro2"] + # Maintainers: this `stm32-metapac` feature list is taken from: # https://github.com/embassy-rs/embassy/blob/2e6f4237f2410aa18c9866a5a1a5ed1f3bec8a4e/embassy-stm32/Cargo.toml#L143 # It should be updated if `stm32-metapac` version changes because it might contain new chip definitions. -- cgit v1.2.3