Skip to content

Commit afa8b2e

Browse files
committed
Don't hard fault trying to run boot.py if there's no heap
1 parent 09d1c84 commit afa8b2e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,10 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
704704
vstr_t *boot_output;
705705

706706
STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
707+
if (safe_mode == NO_HEAP) {
708+
return;
709+
}
710+
707711
// If not in safe mode, run boot before initing USB and capture output in a file.
708712

709713
// There is USB setup to do even if boot.py is not actually run.

0 commit comments

Comments
 (0)