Skip to content

Commit db984b7

Browse files
committed
esp8266: Enable stack overflow checking.
1 parent 1d5d4f4 commit db984b7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

esp8266/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
STATIC char heap[16384];
4242

4343
STATIC void mp_reset(void) {
44-
mp_stack_set_limit(10240);
44+
mp_stack_set_top((void*)0x40000000);
45+
mp_stack_set_limit(8192);
4546
mp_hal_init();
4647
gc_init(heap, heap + sizeof(heap));
4748
mp_init();

esp8266/mpconfigport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define MICROPY_MEM_STATS (0)
1111
#define MICROPY_DEBUG_PRINTERS (1)
1212
#define MICROPY_ENABLE_GC (1)
13-
#define MICROPY_STACK_CHECK (0)
13+
#define MICROPY_STACK_CHECK (1)
1414
#define MICROPY_REPL_EVENT_DRIVEN (1)
1515
#define MICROPY_HELPER_REPL (1)
1616
#define MICROPY_HELPER_LEXER_UNIX (0)

0 commit comments

Comments
 (0)