aboutsummaryrefslogtreecommitdiff
path: root/ports/teensy/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/teensy/main.c')
-rw-r--r--ports/teensy/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/teensy/main.c b/ports/teensy/main.c
index df3fd1ffc..d4c5f0396 100644
--- a/ports/teensy/main.c
+++ b/ports/teensy/main.c
@@ -9,6 +9,7 @@
#include "py/gc.h"
#include "py/mphal.h"
#include "gccollect.h"
+#include "lib/utils/gchelper.h"
#include "lib/utils/pyexec.h"
#include "lib/mp-readline/readline.h"
#include "lexermemzip.h"
@@ -349,6 +350,12 @@ soft_reset:
goto soft_reset;
}
+void gc_collect(void) {
+ gc_collect_start();
+ gc_helper_collect_regs_and_stack();
+ gc_collect_end();
+}
+
// stub out __libc_init_array. It's called by mk20dx128.c and is used to call
// global C++ constructors. Since this is a C-only projects, we don't need to
// call constructors.