Don't hard fault trying to run boot.py if there's no heap

This commit is contained in:
Jeff Epler 2022-07-13 13:56:49 -05:00
parent 09d1c846c4
commit afa8b2ea72
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 4 additions and 0 deletions

4
main.c
View File

@ -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.