diff options
Diffstat (limited to 'supervisor/shared/safe_mode.c')
| -rw-r--r-- | supervisor/shared/safe_mode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index c1ce1fc9c..3bb75b897 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -105,7 +105,7 @@ void print_safe_mode_message(safe_mode_t reason) { if (reason != NO_SAFE_MODE) { serial_write("\r\n"); serial_write_compressed(translate("You are running in safe mode which means something unanticipated happened.\n")); - if (reason == HARD_CRASH || reason == MICROPY_NLR_JUMP_FAIL || reason == MICROPY_FATAL_ERROR) { + if (reason == HARD_CRASH || reason == MICROPY_NLR_JUMP_FAIL || reason == MICROPY_FATAL_ERROR || reason == GC_ALLOC_OUTSIDE_VM) { serial_write_compressed(translate("Looks like our core CircuitPython code crashed hard. Whoops!\nPlease file an issue at https://github.com/adafruit/circuitpython/issues\n with the contents of your CIRCUITPY drive and this message:\n")); if (reason == HARD_CRASH) { serial_write_compressed(translate("Crash into the HardFault_Handler.\n")); @@ -113,6 +113,8 @@ void print_safe_mode_message(safe_mode_t reason) { serial_write_compressed(translate("MicroPython NLR jump failed. Likely memory corruption.\n")); } else if (reason == MICROPY_FATAL_ERROR) { serial_write_compressed(translate("MicroPython fatal error.\n")); + } else if (reason == GC_ALLOC_OUTSIDE_VM) { + serial_write_compressed(translate("Attempted heap allocation when MicroPython VM not running.\n")); } } else if (reason == BROWNOUT) { serial_write_compressed(translate("The microcontroller's power dipped. Please make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY).\n")); |
