summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-07-22 12:24:19 -0700
committerGitHub <noreply@github.com>2020-07-22 12:24:19 -0700
commit1ec358094671716cadf9b17ca51deb346070bcae (patch)
tree39be57fa634c8489178a3afce72fb2e603f8b333 /main.c
parenteb24653d3ffa85dbe5209d5834bb87f76a7c57e1 (diff)
parent05a10f7905bfb77f3d5dff2525c9d10375801329 (diff)
Merge branch 'main' into memmonitor
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