From afa8b2ea724f862fc0a23db303f7d0f937e181d7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 13 Jul 2022 13:56:49 -0500 Subject: [PATCH] Don't hard fault trying to run boot.py if there's no heap --- main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.c b/main.c index 952a17e8a8..5fcb2d61a6 100644 --- a/main.c +++ b/main.c @@ -704,6 +704,10 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re vstr_t *boot_output; STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { + if (safe_mode == NO_HEAP) { + return; + } + // If not in safe mode, run boot before initing USB and capture output in a file. // There is USB setup to do even if boot.py is not actually run.