summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-09-26 00:34:06 +1000
committerDamien George <damien@micropython.org>2025-10-10 14:49:09 +1100
commit76efdfa4d017e88ad4aeae9aa22f01dcc9229f8b (patch)
tree543461f8690858dde2bc86df6fce1b3c2a34acda
parentb68574e59171e509d0e4b1b12e490726e460b5c3 (diff)
alif/main: Replace mp_stack_set with mp_cstack_init_with_top.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/alif/main.c4
-rw-r--r--ports/alif/mpconfigport.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/ports/alif/main.c b/ports/alif/main.c
index 308d8df90..d938b9ce4 100644
--- a/ports/alif/main.c
+++ b/ports/alif/main.c
@@ -29,7 +29,6 @@
#include "py/gc.h"
#include "py/mperrno.h"
#include "py/mphal.h"
-#include "py/stackctrl.h"
#include "extmod/modbluetooth.h"
#include "extmod/modmachine.h"
#include "extmod/modnetwork.h"
@@ -92,8 +91,7 @@ int main(void) {
#endif
// Initialise stack extents and GC heap.
- mp_stack_set_top(&__StackTop);
- mp_stack_set_limit(&__StackTop - &__StackLimit - 1024);
+ mp_cstack_init_with_top(&__StackTop, &__StackTop - &__StackLimit);
gc_init(&__GcHeapStart, &__GcHeapEnd);
#if MICROPY_PY_LWIP
diff --git a/ports/alif/mpconfigport.h b/ports/alif/mpconfigport.h
index 6b30ea2e6..7bd33565e 100644
--- a/ports/alif/mpconfigport.h
+++ b/ports/alif/mpconfigport.h
@@ -97,6 +97,7 @@
// Python internal features
#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)
#ifndef MICROPY_FLOAT_IMPL