common/mp_utils: Remove exec_bootscript.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
iabdalkader 2025-09-03 11:36:06 +02:00
parent 0b0f7fb6b4
commit 8f74e0b390
2 changed files with 0 additions and 31 deletions

View File

@ -35,7 +35,6 @@
#include "shared/runtime/softtimer.h" #include "shared/runtime/softtimer.h"
#include "shared/runtime/pyexec.h" #include "shared/runtime/pyexec.h"
#include "omv_boardconfig.h" #include "omv_boardconfig.h"
#include "usbdbg.h"
#include "mp_utils.h" #include "mp_utils.h"
void __attribute__((weak)) gc_collect(void) { void __attribute__((weak)) gc_collect(void) {
@ -59,35 +58,6 @@ void __attribute__((weak)) gc_collect(void) {
gc_collect_end(); 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) { void mp_init_gc_stack(void *sstack, void *estack, void *heap_start, void *heap_end, size_t stack_limit) {
// Initialize the stack. // Initialize the stack.
mp_stack_set_top(estack); mp_stack_set_top(estack);

View File

@ -27,5 +27,4 @@
#define __MP_UTILS_H__ #define __MP_UTILS_H__
typedef struct _fs_user_mount_t fs_user_mount_t; 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); 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__ #endif // __MP_UTILS_H__