Skip to content

Commit ed9ba7f

Browse files
committed
Auto merge of #143 - jonas-schievink:armv6default, r=jonas-schievink
Assume ARMv6 when `<cpu>` section is missing This makes the generated crates build in more cases.
2 parents 29ee89a + 8b3b278 commit ed9ba7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ pub fn interrupt(
242242
match *target {
243243
Target::CortexM => {
244244
let is_armv6 = match device.cpu {
245-
Some(ref cpu) if cpu.name.starts_with("CM0") => true,
246-
_ => false,
245+
Some(ref cpu) => cpu.name.starts_with("CM0"),
246+
None => true, // default to armv6 when the <cpu> section is missing
247247
};
248248

249249
if is_armv6 {

0 commit comments

Comments
 (0)