diff --git a/Cargo.lock b/Cargo.lock index bf753973..3396d588 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "svd2rust" -version = "0.11.3" +version = "0.11.4" dependencies = [ "cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.20.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/src/generate.rs b/src/generate.rs index ef05584e..de7f9db5 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -243,8 +243,8 @@ pub fn interrupt( match *target { Target::CortexM => { let is_armv6 = match device.cpu { - Some(ref cpu) if cpu.name.starts_with("CM0") => true, - _ => false, + Some(ref cpu) => cpu.name.starts_with("CM0"), + None => true, // default to armv6 when the section is missing }; if is_armv6 {