diff --git a/common/mp_utils.c b/common/mp_utils.c index a45781d48..5418f8abb 100644 --- a/common/mp_utils.c +++ b/common/mp_utils.c @@ -59,35 +59,6 @@ void __attribute__((weak)) gc_collect(void) { gc_collect_end(); } -bool mp_exec_bootscript(const char *path, bool interruptible) { - nlr_buf_t nlr; - bool interrupted = false; - - if (nlr_push(&nlr) == 0) { - // Enable IDE interrupts if allowed. - if (interruptible) { - usbdbg_set_irq_enabled(true); - usbdbg_set_script_running(true); - } - - // Parse, compile and execute the script. - pyexec_file_if_exists(path, true); - nlr_pop(); - } else { - interrupted = true; - } - - // Disable IDE interrupts - usbdbg_set_irq_enabled(false); - usbdbg_set_script_running(false); - - if (interrupted) { - mp_obj_print_exception(&mp_plat_print, (mp_obj_t) nlr.ret_val); - } - - return interrupted; -} - void mp_init_gc_stack(void *sstack, void *estack, void *heap_start, void *heap_end, size_t stack_limit) { // Initialize the stack. mp_stack_set_top(estack); diff --git a/common/mp_utils.h b/common/mp_utils.h index 1ef9a194e..831fe674a 100644 --- a/common/mp_utils.h +++ b/common/mp_utils.h @@ -27,5 +27,4 @@ #define __MP_UTILS_H__ typedef struct _fs_user_mount_t fs_user_mount_t; void mp_init_gc_stack(void *stack_start, void *stack_end, void *heap_start, void *heap_end, size_t stack_limit); -bool mp_exec_bootscript(const char *path, bool interruptible); #endif // __MP_UTILS_H__