panic in debug mode if sleep methods are called in an exception handler (unless PICO_ALLOW_SLEEP_IN_EXCEPTION is set)
This commit is contained in:
@ -124,9 +124,7 @@ void runtime_init(void) {
|
||||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
uint32_t xpsr;
|
||||
__asm volatile ("mrs %0, XPSR" : "=r" (xpsr)::);
|
||||
if (xpsr & 0xffu) {
|
||||
if (__get_current_exception()) {
|
||||
// crap; started in exception handler
|
||||
__asm ("bkpt #0");
|
||||
}
|
||||
|
Reference in New Issue
Block a user