Switch panic_handler to panic_halt

Move away from panic_abort as it uses intrinsics, which is nightly only.
This commit is contained in:
atse 2024-01-12 17:26:40 +08:00
parent 7646ff9037
commit 8008870bc1
3 changed files with 6 additions and 6 deletions

8
Cargo.lock generated
View File

@ -327,10 +327,10 @@ dependencies = [
]
[[package]]
name = "panic-abort"
version = "0.3.2"
name = "panic-halt"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e20e6499bbbc412f280b04a42346b356c6fa0753d5fd22b7bd752ff34c778ee"
checksum = "de96540e0ebde571dc55c73d60ef407c653844e6f9a1e2fdbd40c07b9252d812"
[[package]]
name = "panic-semihosting"
@ -563,7 +563,7 @@ dependencies = [
"nb 1.0.0",
"nom",
"num-traits",
"panic-abort",
"panic-halt",
"panic-semihosting",
"serde",
"serde-json-core",

View File

@ -14,7 +14,7 @@ features = []
default-target = "thumbv7em-none-eabihf"
[dependencies]
panic-abort = "0.3"
panic-halt = "0.2"
panic-semihosting = { version = "0.5", optional = true }
log = "0.4"
bare-metal = "1"

View File

@ -5,7 +5,7 @@
// TODO: #![deny(warnings, unused)]
#[cfg(not(any(feature = "semihosting", test)))]
use panic_abort as _;
use panic_halt as _;
#[cfg(all(feature = "semihosting", not(test)))]
use panic_semihosting as _;