File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 2929#include <string.h>
3030
3131#include "py/runtime.h"
32- #include "py/stackctrl.h"
3332#include "py/gc.h"
3433#include "py/mperrno.h"
3534#include "py/mphal.h"
@@ -295,11 +294,8 @@ int main(void) {
295294 mp_thread_init ();
296295 #endif
297296
298- // Stack limit should be less than real stack size, so we have a chance
299- // to recover from limit hit. (Limit is measured in bytes.)
300297 // Note: stack control relies on main thread being initialised above
301- mp_stack_set_top (& _estack );
302- mp_stack_set_limit ((char * )& _estack - (char * )& _sstack - 1024 );
298+ mp_cstack_init_with_top (& _estack , (char * )& _estack - (char * )& _sstack );
303299
304300 // GC init
305301 gc_init (MICROPY_HEAP_START , MICROPY_HEAP_END );
Original file line number Diff line number Diff line change 9292#define MICROPY_TRACKED_ALLOC (MICROPY_SSL_MBEDTLS || MICROPY_BLUETOOTH_BTSTACK)
9393#define MICROPY_READER_VFS (1)
9494#define MICROPY_ENABLE_GC (1)
95+ #define MICROPY_STACK_CHECK_MARGIN (1024)
9596#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
9697#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0)
9798#define MICROPY_REPL_INFO (1)
You can’t perform that action at this time.
0 commit comments