summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-09-26 00:38:07 +1000
committerDamien George <damien@micropython.org>2025-10-10 14:49:09 +1100
commitaf2231896169bd409324cc99d9a72896b370ee69 (patch)
treed3d1801f17bc34914cfb5a18f901181b233d3f26
parent2399b4ea68ba7978d00b3bd3d315dcd57ac02ef3 (diff)
mimxrt/main: Replace mp_stack_set calls with mp_cstack_init_with_top.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/mimxrt/main.c4
-rw-r--r--ports/mimxrt/mpconfigport.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/ports/mimxrt/main.c b/ports/mimxrt/main.c
index 7166171f1..22809916e 100644
--- a/ports/mimxrt/main.c
+++ b/ports/mimxrt/main.c
@@ -29,7 +29,6 @@
#include "py/runtime.h"
#include "py/gc.h"
#include "py/mperrno.h"
-#include "py/stackctrl.h"
#include "shared/readline/readline.h"
#include "shared/runtime/gchelper.h"
#include "shared/runtime/pyexec.h"
@@ -100,8 +99,7 @@ int main(void) {
led_init();
#endif
- mp_stack_set_top(&_estack);
- mp_stack_set_limit(&_estack - &_sstack - 1024);
+ mp_cstack_init_with_top(&_estack, &_estack - &_sstack);
gc_init(&_gc_heap_start, &_gc_heap_end);
mp_init();
diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h
index d6694badb..8ad789d93 100644
--- a/ports/mimxrt/mpconfigport.h
+++ b/ports/mimxrt/mpconfigport.h
@@ -54,6 +54,7 @@ uint32_t trng_random_u32(void);
#define MICROPY_TRACKED_ALLOC (MICROPY_SSL_MBEDTLS)
#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_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_SCHEDULER_DEPTH (8)