Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions bricks/_common/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ MICROPY_ROM_TEXT_COMPRESSION ?= 1
include $(TOP)/py/py.mk
include $(TOP)/extmod/extmod.mk

# MICROPY_VFS_ROM is enabled so that py/persistentcode.c can reference the
# bytecode and string data of a downloaded program in place instead of copying
# it to the heap. MICROPY_VFS is not enabled, so the VfsRom object and its file
# wrapper are never registered and the linker discards all of their code. Drop
# the translation units entirely so that their qstrs are not added either.
UNUSED_EXTMOD_SRC_C = extmod/vfs_rom.c extmod/vfs_rom_file.c
PY_O := $(filter-out $(addprefix $(BUILD)/,$(UNUSED_EXTMOD_SRC_C:.c=.o)), $(PY_O))
SRC_QSTR := $(filter-out $(UNUSED_EXTMOD_SRC_C), $(SRC_QSTR))

INC += -I.
INC += -I$(TOP)
ifeq ($(PB_MCU_FAMILY),STM32)
Expand Down