aboutsummaryrefslogtreecommitdiff
path: root/src/peripheral/scb.rs
diff options
context:
space:
mode:
authorGravatar Tyler Holmes <tyler@holmesengineering.com> 2021-12-15 11:27:04 -0800
committerGravatar Tyler Holmes <tyler@holmesengineering.com> 2021-12-19 12:14:30 -0800
commitf0dc654951d7aa7910b662c4da61c06bab671729 (patch)
tree8075ec8495503d9d0e1a21266c10a61bcb9ad91c /src/peripheral/scb.rs
parent441cb87e4095eafbd8b170d8f0848b99fa1ec72e (diff)
downloadcortex-m-f0dc654951d7aa7910b662c4da61c06bab671729.tar.gz
cortex-m-f0dc654951d7aa7910b662c4da61c06bab671729.tar.zst
cortex-m-f0dc654951d7aa7910b662c4da61c06bab671729.zip
Switch "native" check from being x86_64 only to checking `HOST`
If `HOST==TARGET`, we know we're compiling natively. Set a new `rustc` cfg for this and use it where we previously checked for `x86_64`.
Diffstat (limited to '')
-rw-r--r--src/peripheral/scb.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/peripheral/scb.rs b/src/peripheral/scb.rs
index 28cfca8..b61c4ff 100644
--- a/src/peripheral/scb.rs
+++ b/src/peripheral/scb.rs
@@ -182,7 +182,7 @@ impl SCB {
5 => VectActive::Exception(Exception::BusFault),
#[cfg(not(armv6m))]
6 => VectActive::Exception(Exception::UsageFault),
- #[cfg(any(armv8m, target_arch = "x86_64"))]
+ #[cfg(any(armv8m, native))]
7 => VectActive::Exception(Exception::SecureFault),
11 => VectActive::Exception(Exception::SVCall),
#[cfg(not(armv6m))]
@@ -218,7 +218,7 @@ pub enum Exception {
UsageFault,
/// Secure fault interrupt (only on ARMv8-M)
- #[cfg(any(armv8m, target_arch = "x86_64"))]
+ #[cfg(any(armv8m, native))]
SecureFault,
/// SV call interrupt
@@ -250,7 +250,7 @@ impl Exception {
Exception::BusFault => -11,
#[cfg(not(armv6m))]
Exception::UsageFault => -10,
- #[cfg(any(armv8m, target_arch = "x86_64"))]
+ #[cfg(any(armv8m, native))]
Exception::SecureFault => -9,
Exception::SVCall => -5,
#[cfg(not(armv6m))]
@@ -293,7 +293,7 @@ impl VectActive {
5 => VectActive::Exception(Exception::BusFault),
#[cfg(not(armv6m))]
6 => VectActive::Exception(Exception::UsageFault),
- #[cfg(any(armv8m, target_arch = "x86_64"))]
+ #[cfg(any(armv8m, native))]
7 => VectActive::Exception(Exception::SecureFault),
11 => VectActive::Exception(Exception::SVCall),
#[cfg(not(armv6m))]
@@ -934,7 +934,7 @@ pub enum SystemHandler {
UsageFault = 6,
/// Secure fault interrupt (only on ARMv8-M)
- #[cfg(any(armv8m, target_arch = "x86_64"))]
+ #[cfg(any(armv8m, native))]
SecureFault = 7,
/// SV call interrupt