mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
ports/stm32: Disable btree by default.
I don't think this was ever working correctly because it used untracked malloc's from GC. This feature can be re-enabled per board but it will require a libc heap from now on.
This commit is contained in:
parent
527934e8ee
commit
83da61a35c
@ -142,6 +142,11 @@ MPY_CFLAGS += -DMICROPY_PY_IMU=1
|
||||
MICROPY_ARGS += MICROPY_PY_IMU=1
|
||||
endif
|
||||
|
||||
ifeq ($(MICROPY_PY_BTREE), 1)
|
||||
MPY_CFLAGS += -DMICROPY_PY_BTREE=1
|
||||
MICROPY_ARGS += MICROPY_PY_BTREE=1
|
||||
endif
|
||||
|
||||
ifeq ($(MICROPY_PY_TOF), 1)
|
||||
MPY_CFLAGS += -DMICROPY_PY_TOF=1
|
||||
MICROPY_ARGS += MICROPY_PY_TOF=1
|
||||
|
||||
@ -374,32 +374,6 @@ soft_reset_exit:
|
||||
goto soft_reset;
|
||||
}
|
||||
|
||||
#if MICROPY_PY_BTREE
|
||||
void *malloc(size_t size) {
|
||||
void *p = gc_alloc(size, false);
|
||||
if (p == NULL) {
|
||||
errno = ENOMEM;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
void free(void *ptr) {
|
||||
gc_free(ptr);
|
||||
}
|
||||
|
||||
void *calloc(size_t nmemb, size_t size) {
|
||||
return malloc(nmemb * size);
|
||||
}
|
||||
|
||||
void *realloc(void *ptr, size_t size) {
|
||||
void *p = gc_realloc(ptr, size, true);
|
||||
if (p == NULL) {
|
||||
errno = ENOMEM;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
static mp_obj_t pyb_main(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||
// Unused.
|
||||
return mp_const_none;
|
||||
|
||||
@ -92,15 +92,13 @@ MPY_CFLAGS += -I$(TOP_DIR)/$(MICROPY_DIR)/shared/runtime/
|
||||
MPY_CFLAGS += -DMICROPY_PY_SSL=1 \
|
||||
-DMICROPY_SSL_MBEDTLS=1 \
|
||||
-DMICROPY_STREAMS_POSIX_API=1 \
|
||||
-DMICROPY_VFS_FAT=1 \
|
||||
-DMICROPY_PY_BTREE=1
|
||||
-DMICROPY_VFS_FAT=1
|
||||
|
||||
|
||||
MICROPY_ARGS += STM32LIB_CMSIS_DIR=$(TOP_DIR)/$(CMSIS_DIR) \
|
||||
STM32LIB_HAL_DIR=$(TOP_DIR)/$(HAL_DIR) \
|
||||
MICROPY_PY_SSL=1 \
|
||||
MICROPY_SSL_MBEDTLS=1 \
|
||||
MICROPY_PY_BTREE=1\
|
||||
MICROPY_PY_OPENAMP=$(MICROPY_PY_OPENAMP)\
|
||||
MICROPY_PY_OPENAMP_REMOTEPROC=$(MICROPY_PY_OPENAMP_REMOTEPROC)
|
||||
|
||||
@ -354,10 +352,12 @@ FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/shared/,\
|
||||
readline/readline.o \
|
||||
)
|
||||
|
||||
ifeq ($(MICROPY_PY_BTREE), 1)
|
||||
FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/lib/,\
|
||||
berkeley-db-1.xx/btree/*.o \
|
||||
berkeley-db-1.xx/mpool/*.o \
|
||||
)
|
||||
endif
|
||||
|
||||
#------------- mbedtls -------------------#
|
||||
FIRM_OBJ += $(wildcard $(BUILD)/$(MICROPY_DIR)/lib/mbedtls/library/*.o)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user