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.
This commit is contained in:
bunnie 2025-09-20 22:11:22 +08:00
parent f2fe921ff1
commit ee36a25acd

View file

@ -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";