teensy: Provide own implementation of gc_collect, to not use stm32.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
530c76f6ca
commit
65b90cd0f9
|
@ -95,7 +95,6 @@ SRC_C = \
|
|||
usb.c \
|
||||
|
||||
STM_SRC_C = $(addprefix ports/stm32/,\
|
||||
gccollect.c \
|
||||
irq.c \
|
||||
pin.c \
|
||||
pin_named_pins.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.
|
||||
|
|
Loading…
Reference in New Issue