diff options
| -rw-r--r-- | ports/rp2/main.c | 5 | ||||
| -rw-r--r-- | ports/rp2/mpconfigport.h | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ports/rp2/main.c b/ports/rp2/main.c index 0f2721f17..1ce1d2bf3 100644 --- a/ports/rp2/main.c +++ b/ports/rp2/main.c @@ -27,11 +27,11 @@ #include <stdio.h> #include "py/compile.h" +#include "py/cstack.h" #include "py/runtime.h" #include "py/gc.h" #include "py/mperrno.h" #include "py/mphal.h" -#include "py/stackctrl.h" #include "extmod/modbluetooth.h" #include "extmod/modnetwork.h" #include "shared/readline/readline.h" @@ -114,8 +114,7 @@ int main(int argc, char **argv) { mp_hal_time_ns_set_from_rtc(); // Initialise stack extents and GC heap. - mp_stack_set_top(&__StackTop); - mp_stack_set_limit(&__StackTop - &__StackBottom - 256); + mp_cstack_init_with_top(&__StackTop, &__StackTop - &__StackBottom); gc_init(&__GcHeapStart, &__GcHeapEnd); #if MICROPY_PY_LWIP diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index 6ef994bb8..3399212aa 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -81,6 +81,7 @@ #define MICROPY_TRACKED_ALLOC (MICROPY_SSL_MBEDTLS || MICROPY_BLUETOOTH_BTSTACK) #define MICROPY_READER_VFS (1) #define MICROPY_ENABLE_GC (1) +#define MICROPY_STACK_CHECK_MARGIN (256) #define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1) #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) |
