diff options
| -rw-r--r-- | ports/renesas-ra/main.c | 6 | ||||
| -rw-r--r-- | ports/renesas-ra/mpconfigport.h | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/ports/renesas-ra/main.c b/ports/renesas-ra/main.c index cfc4611ec..e0ef5ee19 100644 --- a/ports/renesas-ra/main.c +++ b/ports/renesas-ra/main.c @@ -29,7 +29,6 @@ #include <string.h> #include "py/runtime.h" -#include "py/stackctrl.h" #include "py/gc.h" #include "py/mperrno.h" #include "py/mphal.h" @@ -295,11 +294,8 @@ soft_reset: mp_thread_init(); #endif - // Stack limit should be less than real stack size, so we have a chance - // to recover from limit hit. (Limit is measured in bytes.) // Note: stack control relies on main thread being initialised above - mp_stack_set_top(&_estack); - mp_stack_set_limit((char *)&_estack - (char *)&_sstack - 1024); + mp_cstack_init_with_top(&_estack, (char *)&_estack - (char *)&_sstack); // GC init gc_init(MICROPY_HEAP_START, MICROPY_HEAP_END); diff --git a/ports/renesas-ra/mpconfigport.h b/ports/renesas-ra/mpconfigport.h index 70d38e7d2..946f71e7c 100644 --- a/ports/renesas-ra/mpconfigport.h +++ b/ports/renesas-ra/mpconfigport.h @@ -92,6 +92,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 (1024) #define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1) #define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0) #define MICROPY_REPL_INFO (1) |
