File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 3636#include "py/parse.h"
3737#include "py/obj.h"
3838#include "py/runtime.h"
39- #include "py/stackctrl.h"
4039#include "py/gc.h"
4140#include "py/compile.h"
4241#include "py/persistentcode.h"
@@ -126,11 +125,7 @@ void MP_NORETURN _start(void) {
126125
127126 led_state (1 , 1 ); // MICROPY_HW_LED_1 aka MICROPY_HW_LED_RED
128127
129- mp_stack_set_top (& _ram_end );
130-
131- // Stack limit should be less than real stack size, so we have a chance
132- // to recover from limit hit. (Limit is measured in bytes.)
133- mp_stack_set_limit ((char * )& _ram_end - (char * )& _heap_end - 400 );
128+ mp_cstack_init_with_top (& _ram_end , (char * )& _ram_end - (char * )& _heap_end );
134129
135130 machine_init ();
136131
Original file line number Diff line number Diff line change 120120#define MICROPY_ENABLE_GC (1)
121121#define MICROPY_ENABLE_FINALISER (1)
122122#define MICROPY_STACK_CHECK (1)
123+ #define MICROPY_STACK_CHECK_MARGIN (400)
123124#define MICROPY_HELPER_REPL (1)
124125#define MICROPY_REPL_INFO (1)
125126#define MICROPY_REPL_AUTO_INDENT (1)
You can’t perform that action at this time.
0 commit comments