summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rwxr-xr-xmain.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index 5ad146c9c..2fb468913 100755
--- a/main.c
+++ b/main.c
@@ -101,6 +101,10 @@ void do_str(const char *src, mp_parse_input_kind_t input_kind) {
}
}
+#if MICROPY_ENABLE_PYSTACK
+static size_t PLACE_IN_DTCM_BSS(_pystack[CIRCUITPY_PYSTACK_SIZE / sizeof(size_t)]);
+#endif
+
void start_mp(supervisor_allocation* heap) {
reset_status_led();
autoreload_stop();
@@ -129,6 +133,10 @@ void start_mp(supervisor_allocation* heap) {
// Clear the readline history. It references the heap we're about to destroy.
readline_init0();
+ #if MICROPY_ENABLE_PYSTACK
+ mp_pystack_init(_pystack, _pystack + (sizeof(_pystack) / sizeof(size_t)));
+ #endif
+
#if MICROPY_ENABLE_GC
gc_init(heap->ptr, heap->ptr + heap->length / 4);
#endif