diff --git a/ports/esp32/main.c b/ports/esp32/main.c index 6fb15d3cc8..62dd7ae3cc 100644 --- a/ports/esp32/main.c +++ b/ports/esp32/main.c @@ -116,6 +116,10 @@ void mp_task(void *pvParameter) { } void *mp_task_heap = MP_PLAT_ALLOC_HEAP(MICROPY_GC_INITIAL_HEAP_SIZE); + if (mp_task_heap == NULL) { + printf("mp_task_heap allocation failed!\n"); + esp_restart(); + } soft_reset: // initialise the stack pointer for the main thread