alif/main: Replace mp_stack_set with mp_cstack_init_with_top.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2025-09-26 00:34:06 +10:00
parent b68574e591
commit 76efdfa4d0
2 changed files with 2 additions and 3 deletions

View File

@@ -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

View File

@@ -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