mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Added check for resource usage and to generate an compile error for thumbv6 exceptions
This commit is contained in:
parent
9f38a39377
commit
0f8bdbdd3f
2 changed files with 39 additions and 1 deletions
|
|
@ -339,3 +339,13 @@ pub const fn create_mask<const N: usize>(list_of_shifts: [u32; N]) -> u32 {
|
|||
|
||||
mask
|
||||
}
|
||||
|
||||
#[cfg(not(armv6m))]
|
||||
pub const fn v6_panic() {
|
||||
// For non-v6 all is fine
|
||||
}
|
||||
|
||||
#[cfg(armv6m)]
|
||||
pub const fn v6_panic() {
|
||||
panic!("Exceptions with shared resources are not allowed when compiling for thumbv6. Use local resources or `#[lock_free]` shared resources");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue