rp2: Switch to use new cstack API for stack limit checks.
This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
parent
80616aee71
commit
fbc19596f0
2 changed files with 3 additions and 3 deletions
|
|
@ -27,11 +27,11 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "py/compile.h"
|
||||
#include "py/cstack.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "extmod/modbluetooth.h"
|
||||
#include "extmod/modnetwork.h"
|
||||
#include "shared/readline/readline.h"
|
||||
|
|
@ -114,8 +114,7 @@ int main(int argc, char **argv) {
|
|||
mp_hal_time_ns_set_from_rtc();
|
||||
|
||||
// Initialise stack extents and GC heap.
|
||||
mp_stack_set_top(&__StackTop);
|
||||
mp_stack_set_limit(&__StackTop - &__StackBottom - 256);
|
||||
mp_cstack_init_with_top(&__StackTop, &__StackTop - &__StackBottom);
|
||||
gc_init(&__GcHeapStart, &__GcHeapEnd);
|
||||
|
||||
#if MICROPY_PY_LWIP
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@
|
|||
#define MICROPY_TRACKED_ALLOC (MICROPY_SSL_MBEDTLS || MICROPY_BLUETOOTH_BTSTACK)
|
||||
#define MICROPY_READER_VFS (1)
|
||||
#define MICROPY_ENABLE_GC (1)
|
||||
#define MICROPY_STACK_CHECK_MARGIN (256)
|
||||
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
|
||||
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
|
||||
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
|
||||
|
|
|
|||
Loading…
Reference in a new issue