C++: use esp-backtrace as a panic handler on the esp platform

This commit is contained in:
Olivier Goffart 2023-07-24 11:03:12 +02:00 committed by Olivier Goffart
parent da55f4591a
commit ed0e4726d1
3 changed files with 9 additions and 1 deletions

View file

@ -176,8 +176,10 @@ mod allocator {
static ALLOCATOR: CAlloc = CAlloc;
}
#[cfg(not(feature = "std"))]
#[cfg(all(not(feature = "std"), not(feature = "esp-backtrace")))]
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
#[cfg(feature = "esp-backtrace")]
use esp_backtrace as _;