Skip to content

Instantly share code, notes, and snippets.

@thejpster
Created July 27, 2025 13:40
Show Gist options
  • Save thejpster/96a97e5d5fdd9fd7ff988ad915893a87 to your computer and use it in GitHub Desktop.
Save thejpster/96a97e5d5fdd9fd7ff988ad915893a87 to your computer and use it in GitHub Desktop.
Diff from cortex-m v0.7.7 release to https://github.com/rust-embedded/cortex-m/pull/605
diff --color -r cortex-m-07x-branch/asm/inline.rs cortex-m-master/cortex-m/asm/inline.rs
75c75
< asm!("dmb", options(nomem, nostack, preserves_flags));
---
> asm!("dmb", options(nostack, preserves_flags));
82c82
< asm!("dsb", options(nomem, nostack, preserves_flags));
---
> asm!("dsb", options(nostack, preserves_flags));
89c89
< asm!("isb", options(nomem, nostack, preserves_flags));
---
> asm!("isb", options(nostack, preserves_flags));
Binary files cortex-m-07x-branch/bin/thumbv6m-none-eabi-lto.a and cortex-m-master/cortex-m/bin/thumbv6m-none-eabi-lto.a differ
Binary files cortex-m-07x-branch/bin/thumbv7em-none-eabihf-lto.a and cortex-m-master/cortex-m/bin/thumbv7em-none-eabihf-lto.a differ
Binary files cortex-m-07x-branch/bin/thumbv7em-none-eabi-lto.a and cortex-m-master/cortex-m/bin/thumbv7em-none-eabi-lto.a differ
Binary files cortex-m-07x-branch/bin/thumbv7m-none-eabi-lto.a and cortex-m-master/cortex-m/bin/thumbv7m-none-eabi-lto.a differ
Binary files cortex-m-07x-branch/bin/thumbv8m.base-none-eabi-lto.a and cortex-m-master/cortex-m/bin/thumbv8m.base-none-eabi-lto.a differ
Binary files cortex-m-07x-branch/bin/thumbv8m.main-none-eabihf-lto.a and cortex-m-master/cortex-m/bin/thumbv8m.main-none-eabihf-lto.a differ
Binary files cortex-m-07x-branch/bin/thumbv8m.main-none-eabi-lto.a and cortex-m-master/cortex-m/bin/thumbv8m.main-none-eabi-lto.a differ
diff --color -r cortex-m-07x-branch/build.rs cortex-m-master/cortex-m/build.rs
30a31,40
> println!("cargo:rustc-check-cfg=cfg(armv6m)");
> println!("cargo:rustc-check-cfg=cfg(armv7m)");
> println!("cargo:rustc-check-cfg=cfg(armv7em)");
> println!("cargo:rustc-check-cfg=cfg(armv8m)");
> println!("cargo:rustc-check-cfg=cfg(armv8m_base)");
> println!("cargo:rustc-check-cfg=cfg(armv8m_main)");
> println!("cargo:rustc-check-cfg=cfg(cortex_m)");
> println!("cargo:rustc-check-cfg=cfg(has_fpu)");
> println!("cargo:rustc-check-cfg=cfg(native)");
>
Only in cortex-m-07x-branch: .cargo
diff --color -r cortex-m-07x-branch/Cargo.toml cortex-m-master/cortex-m/Cargo.toml
16a17
> rust-version = "1.61"
29a31,34
> [dependencies.serde_json]
> version = "1"
> optional = true
>
37,39d41
<
< [workspace]
< members = ["xtask", "cortex-m-semihosting", "panic-semihosting", "panic-itm"]
diff --color -r cortex-m-07x-branch/CHANGELOG.md cortex-m-master/cortex-m/CHANGELOG.md
9a10,11
> - MSRV is 1.61 to match cortex-m-rt crate
>
Only in cortex-m-07x-branch: CODE_OF_CONDUCT.md
Only in cortex-m-07x-branch: cortex-m-semihosting
Only in cortex-m-07x-branch: .git
Only in cortex-m-07x-branch: .github
Only in cortex-m-07x-branch: .gitignore
Only in cortex-m-07x-branch: LICENSE-APACHE
Only in cortex-m-07x-branch: LICENSE-MIT
Only in cortex-m-07x-branch: panic-itm
Only in cortex-m-07x-branch: panic-semihosting
diff --color -r cortex-m-07x-branch/README.md cortex-m-master/cortex-m/README.md
14c14
< This crate is guaranteed to compile on stable Rust 1.38 and up. It might compile with older versions but that may change in any new patch release.
---
> This crate is guaranteed to compile on stable Rust 1.61 and up. It might compile with older versions but that may change in any new patch release.
38c38
< [CoC]: CODE_OF_CONDUCT.md
---
> [CoC]: ../CODE_OF_CONDUCT.md
diff --color -r cortex-m-07x-branch/src/lib.rs cortex-m-master/cortex-m/src/lib.rs
34c34
< //! and may cause functional problems in systems where some interrupts must be not be disabled
---
> //! and may cause functional problems in systems where some interrupts must not be disabled
66c66
< //! This crate is guaranteed to compile on stable Rust 1.38 and up. It *might*
---
> //! This crate is guaranteed to compile on stable Rust 1.61 and up. It *might*
diff --color -r cortex-m-07x-branch/src/peripheral/mod.rs cortex-m-master/cortex-m/src/peripheral/mod.rs
65c65
< #[cfg(cm7)]
---
> #[cfg(feature = "cm7")]
99c99
< #[cfg(cm7)]
---
> #[cfg(feature = "cm7")]
183c183
< #[cfg(cm7)]
---
> #[cfg(feature = "cm7")]
235c235
< #[cfg(cm7)]
---
> #[cfg(feature = "cm7")]
240c240
< #[cfg(cm7)]
---
> #[cfg(feature = "cm7")]
243c243
< #[cfg(cm7)]
---
> #[cfg(feature = "cm7")]
diff --color -r cortex-m-07x-branch/src/peripheral/scb.rs cortex-m-master/cortex-m/src/peripheral/scb.rs
175,193c175,176
< match icsr as u8 {
< 0 => VectActive::ThreadMode,
< 2 => VectActive::Exception(Exception::NonMaskableInt),
< 3 => VectActive::Exception(Exception::HardFault),
< #[cfg(not(armv6m))]
< 4 => VectActive::Exception(Exception::MemoryManagement),
< #[cfg(not(armv6m))]
< 5 => VectActive::Exception(Exception::BusFault),
< #[cfg(not(armv6m))]
< 6 => VectActive::Exception(Exception::UsageFault),
< #[cfg(any(armv8m, native))]
< 7 => VectActive::Exception(Exception::SecureFault),
< 11 => VectActive::Exception(Exception::SVCall),
< #[cfg(not(armv6m))]
< 12 => VectActive::Exception(Exception::DebugMonitor),
< 14 => VectActive::Exception(Exception::PendSV),
< 15 => VectActive::Exception(Exception::SysTick),
< irqn => VectActive::Interrupt { irqn: irqn - 16 },
< }
---
> // NOTE(unsafe): Assume correctly selected target.
> unsafe { VectActive::from(icsr as u8).unwrap_unchecked() }
303c286
< irqn if irqn >= 16 => VectActive::Interrupt { irqn },
---
> irqn if irqn >= 16 => VectActive::Interrupt { irqn: irqn - 16 },
diff --color -r cortex-m-07x-branch/src/register/lr.rs cortex-m-master/cortex-m/src/register/lr.rs
13a14,16
> ///
> /// # Safety
> /// This function can't be used soundly.
14a18
> #[deprecated = "This function can't be used soundly."]
Only in cortex-m-07x-branch: target
Only in cortex-m-07x-branch: triagebot.toml
Only in cortex-m-07x-branch: xtask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment