mirror of
https://github.com/micropython/micropython.git
synced 2025-12-13 08:20:13 +01:00
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:
@@ -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 (;;) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user