aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/teensy/Makefile1
-rw-r--r--ports/teensy/main.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/ports/teensy/Makefile b/ports/teensy/Makefile
index d3978718e..cf9529442 100644
--- a/ports/teensy/Makefile
+++ b/ports/teensy/Makefile
@@ -95,7 +95,6 @@ SRC_C = \
usb.c \
STM_SRC_C = $(addprefix ports/stm32/,\
- gccollect.c \
irq.c \
pin.c \
pin_named_pins.c \
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.