diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-08-24 23:13:11 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-10 21:36:38 +0300 |
commit | b3a65791b16dcc41281649a0a5faac4e8c00c8e3 (patch) | |
tree | c5966e0a58a9ee5c2077b2048a30f187e0aaecf1 /zephyr/main.c | |
parent | ac70119779c9379ffacd919607b2f9fadd064e19 (diff) | |
download | micropython-b3a65791b16dcc41281649a0a5faac4e8c00c8e3.tar.gz micropython-b3a65791b16dcc41281649a0a5faac4e8c00c8e3.zip |
zephyr: Enable stack checking and micropython.mem_info().
Diffstat (limited to 'zephyr/main.c')
-rw-r--r-- | zephyr/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zephyr/main.c b/zephyr/main.c index 65074b157e..445ef98f4d 100644 --- a/zephyr/main.c +++ b/zephyr/main.c @@ -7,6 +7,7 @@ #include "py/runtime.h" #include "py/repl.h" #include "py/gc.h" +#include "py/stackctrl.h" #include "lib/utils/pyexec.h" void do_str(const char *src, mp_parse_input_kind_t input_kind) { @@ -35,6 +36,9 @@ static char heap[16 * 1024]; int real_main(void) { int stack_dummy; stack_top = (char*)&stack_dummy; + mp_stack_set_top(stack_top); + // Should be set to stack size in prj.mdef minus fuzz factor + mp_stack_set_limit(3584); #if MICROPY_ENABLE_GC gc_init(heap, heap + sizeof(heap)); |