Skip to content

Commit fa365d8

Browse files
Assume ARMv6 when <cpu> section is missing
This makes the generated crates build in more cases
1 parent ad2c8d8 commit fa365d8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generate.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ pub fn interrupt(
244244
Target::CortexM => {
245245
let is_armv6 = match device.cpu {
246246
Some(ref cpu) if cpu.name.starts_with("CM0") => true,
247-
_ => false,
247+
Some(_) => false,
248+
_ => true, // default to armv6 when the <cpu> section is missing
248249
};
249250

250251
if is_armv6 {

0 commit comments

Comments
 (0)