mimxrt/main: Replace mp_stack_set calls 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:38:07 +10:00
parent 2399b4ea68
commit af22318961
2 changed files with 2 additions and 3 deletions

View File

@@ -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();

View File

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