diff options
| author | Damien George | 2021-04-22 11:04:58 +1000 |
|---|---|---|
| committer | Damien George | 2021-04-27 12:08:00 +1000 |
| commit | 65b90cd0f9cb3ee8b5954820cd6d68b782121cd1 (patch) | |
| tree | 208bc3ee2e86be0f922ec9be7b297fab16d1e37c | |
| parent | 530c76f6caee9445f468380f58b98f4e3ceda759 (diff) | |
teensy: Provide own implementation of gc_collect, to not use stm32.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/teensy/Makefile | 1 | ||||
| -rw-r--r-- | ports/teensy/main.c | 7 |
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. |
