samd/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:54:44 +10:00
parent 12220b821e
commit 639150e9f3
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/modmachine.h"
#include "shared/readline/readline.h"
#include "shared/runtime/gchelper.h"
@@ -45,8 +44,7 @@ extern void pwm_deinit_all(void);
extern void sercom_deinit_all(void);
void samd_main(void) {
mp_stack_set_top(&_estack);
mp_stack_set_limit(&_estack - &_sstack - 1024);
mp_cstack_init_with_top(&_estack, &_estack - &_sstack);
mp_hal_time_ns_set_from_rtc();
for (;;) {

View File

@@ -41,6 +41,7 @@
// Python internal features
#define MICROPY_ENABLE_GC (1)
#define MICROPY_STACK_CHECK_MARGIN (1024)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#ifndef MICROPY_PY_BUILTINS_COMPLEX