From ee36a25acd027a371994ea899d5c42506aa90f43 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 20 Sep 2025 22:11:22 +0800 Subject: [PATCH] add check for soc.svd file in simulation some extra registers are made available for helping to manipulate the simulation. map them in if they are around. --- utralib/build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utralib/build.rs b/utralib/build.rs index 43405a621..b05bd810c 100644 --- a/utralib/build.rs +++ b/utralib/build.rs @@ -123,7 +123,11 @@ fn main() { let generated_filename = "src/generated/atsama5d27.rs"; #[cfg(feature = "bao1x")] - let svd_filenames = vec!["bao1x/core.svd", "bao1x/bao1x_peri.svd"]; + let mut svd_filenames = vec!["bao1x/core.svd", "bao1x/bao1x_peri.svd"]; + #[cfg(feature = "bao1x")] + if std::path::Path::new("bao1x/soc.svd").exists() { + svd_filenames.push("bao1x/soc.svd"); + } #[cfg(feature = "bao1x")] let generated_filename = "src/generated/bao1x.rs";