mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-29 21:30:39 +00:00
Try to be more helpful (#2044)
This commit is contained in:
parent
aacc001e5d
commit
897c92e389
@ -33,7 +33,7 @@ pub use context::Context;
|
||||
/// general exceptions, which vector to the user, kernel, or double-exception
|
||||
/// vectors).
|
||||
#[allow(unused)]
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[repr(C)]
|
||||
pub enum ExceptionCause {
|
||||
/// Illegal Instruction
|
||||
|
@ -134,6 +134,14 @@ unsafe extern "C" fn __default_exception(cause: ExceptionCause, save_frame: &mut
|
||||
#[no_mangle]
|
||||
#[link_section = ".rwtext"]
|
||||
extern "C" fn __default_user_exception(cause: ExceptionCause, save_frame: &Context) {
|
||||
#[cfg(any(feature = "esp32", feature = "esp32s3"))]
|
||||
if cause == ExceptionCause::Cp0Disabled {
|
||||
panic!(
|
||||
"Access to the floating point coprocessor is not allowed. You may want to enable the `float-save-restore` feature of the `xtensa-lx-rt` crate. {:08x?}",
|
||||
save_frame
|
||||
)
|
||||
}
|
||||
|
||||
panic!("Exception: {:?}, {:08x?}", cause, save_frame)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user