From e31545860e2c44e67f45dd5132e85f18b6fab5d7 Mon Sep 17 00:00:00 2001 From: Don Reilly Date: Tue, 8 Aug 2023 16:46:30 -0500 Subject: [PATCH 1/3] don't generate adc peripheral for f3 series --- embassy-stm32/build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index 30e25aef..743631b8 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs @@ -310,7 +310,10 @@ fn main() { for p in METADATA.peripherals { // generating RccPeripheral impl for H7 ADC3 would result in bad frequency - if !singletons.contains(&p.name.to_string()) || (p.name == "ADC3" && METADATA.line.starts_with("STM32H7")) { + if !singletons.contains(&p.name.to_string()) + || (p.name == "ADC3" && METADATA.line.starts_with("STM32H7")) + || (p.name.starts_with("ADC") && p.registers.as_ref().map_or(false, |r| r.version == "f3")) + { continue; } From 8a9622ec2ecb9960f17ea0bd5b662783ba522cbd Mon Sep 17 00:00:00 2001 From: Don Reilly Date: Thu, 10 Aug 2023 08:03:35 -0500 Subject: [PATCH 2/3] update metapac tag --- embassy-stm32/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 0d713f60..8f765e9d 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -57,7 +57,7 @@ sdio-host = "0.5.0" embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "a4f293d3a6f72158385f79c98634cb8a14d0d2fc", optional = true } critical-section = "1.1" atomic-polyfill = "1.0.1" -stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-82a24863823a3daf0ca664c7fdf008379d0a0d42" } +stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-7eddb78e705905af4c1dd2359900db3e78a3c500" } vcell = "0.1.3" bxcan = "0.7.0" nb = "1.0.0" @@ -76,7 +76,7 @@ critical-section = { version = "1.1", features = ["std"] } [build-dependencies] proc-macro2 = "1.0.36" quote = "1.0.15" -stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-82a24863823a3daf0ca664c7fdf008379d0a0d42", default-features = false, features = ["metadata"]} +stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-7eddb78e705905af4c1dd2359900db3e78a3c500", default-features = false, features = ["metadata"]} [features] default = ["rt"] From c3128846923718d94921617776008c1eadcd4fec Mon Sep 17 00:00:00 2001 From: Don Reilly Date: Thu, 10 Aug 2023 08:21:03 -0500 Subject: [PATCH 3/3] added exclusion for adc v4 as well --- .vscode/settings.json | 1 + embassy-stm32/build.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 29e8812e..139b432f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -41,4 +41,5 @@ // "examples/stm32wl/Cargo.toml", // "examples/wasm/Cargo.toml", ], + "rust-analyzer.showUnlinkedFileNotification": false, } \ No newline at end of file diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index 743631b8..8a731620 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs @@ -313,6 +313,7 @@ fn main() { if !singletons.contains(&p.name.to_string()) || (p.name == "ADC3" && METADATA.line.starts_with("STM32H7")) || (p.name.starts_with("ADC") && p.registers.as_ref().map_or(false, |r| r.version == "f3")) + || (p.name.starts_with("ADC") && p.registers.as_ref().map_or(false, |r| r.version == "v4")) { continue; }