summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/esp8266/main.c4
-rw-r--r--ports/esp8266/mpconfigport.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/ports/esp8266/main.c b/ports/esp8266/main.c
index da712fce9..fb6cda379 100644
--- a/ports/esp8266/main.c
+++ b/ports/esp8266/main.c
@@ -31,7 +31,6 @@
#include "py/builtin.h"
#include "py/compile.h"
#include "py/runtime.h"
-#include "py/stackctrl.h"
#include "py/mperrno.h"
#include "py/mphal.h"
#include "py/gc.h"
@@ -108,8 +107,7 @@ static void print_reset_info(void) {
#endif
static void mp_reset(void) {
- mp_stack_set_top((void *)0x40000000);
- mp_stack_set_limit(8192);
+ mp_cstack_init_with_top((void *)0x40000000, 8192);
mp_hal_init();
gc_init(heap, heap + sizeof(heap));
mp_init();
diff --git a/ports/esp8266/mpconfigport.h b/ports/esp8266/mpconfigport.h
index 0321de45d..17c3ff441 100644
--- a/ports/esp8266/mpconfigport.h
+++ b/ports/esp8266/mpconfigport.h
@@ -52,6 +52,7 @@
#define MICROPY_ALLOC_PARSE_CHUNK_INIT (64)
#define MICROPY_DEBUG_PRINTER (&mp_debug_print)
#define MICROPY_ENABLE_GC (1)
+#define MICROPY_STACK_CHECK_MARGIN (64)
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
#define MICROPY_REPL_EVENT_DRIVEN (0)
#define MICROPY_USE_INTERNAL_ERRNO (1)