summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/esp32/mpconfigport.h3
-rw-r--r--ports/esp8266/Makefile6
-rw-r--r--ports/mimxrt/mpconfigport.h2
-rw-r--r--ports/nrf/Makefile6
-rw-r--r--ports/qemu-arm/Makefile6
-rw-r--r--ports/renesas-ra/Makefile13
-rw-r--r--ports/samd/Makefile6
-rw-r--r--ports/stm32/Makefile6
-rw-r--r--ports/unix/Makefile5
-rw-r--r--ports/windows/Makefile2
-rw-r--r--ports/zephyr/mpconfigport.h2
-rw-r--r--py/mkrules.mk5
12 files changed, 6 insertions, 56 deletions
diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h
index 778a4cbc7..f81ad58fa 100644
--- a/ports/esp32/mpconfigport.h
+++ b/ports/esp32/mpconfigport.h
@@ -49,9 +49,6 @@
#define MICROPY_WARNINGS (1)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#define MICROPY_STREAMS_POSIX_API (1)
-#define MICROPY_MODULE_FROZEN_STR (0)
-#define MICROPY_MODULE_FROZEN_MPY (1)
-#define MICROPY_QSTR_EXTRA_POOL mp_qstr_frozen_const_pool
#define MICROPY_USE_INTERNAL_ERRNO (0) // errno.h from xtensa-esp32-elf/sys-include/sys
#define MICROPY_USE_INTERNAL_PRINTF (0) // ESP32 SDK requires its own printf
#define MICROPY_SCHEDULER_DEPTH (8)
diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile
index e4db811f2..1cdcafa03 100644
--- a/ports/esp8266/Makefile
+++ b/ports/esp8266/Makefile
@@ -200,12 +200,6 @@ $(BUILD)/uart.o: $(CONFVARS_FILE)
FROZEN_EXTRA_DEPS = $(CONFVARS_FILE)
-ifneq ($(FROZEN_MANIFEST),)
-CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
-CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
-CFLAGS += -DMICROPY_MODULE_FROZEN_STR
-endif
-
.PHONY: deploy
deploy: $(BUILD)/firmware-combined.bin
diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h
index b1cd84f26..ce71cb279 100644
--- a/ports/mimxrt/mpconfigport.h
+++ b/ports/mimxrt/mpconfigport.h
@@ -60,8 +60,6 @@ uint32_t trng_random_u32(void);
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_SCHEDULER_DEPTH (8)
#define MICROPY_VFS (1)
-#define MICROPY_MODULE_FROZEN_MPY (1)
-#define MICROPY_QSTR_EXTRA_POOL mp_qstr_frozen_const_pool
// Control over Python builtins
#define MICROPY_PY_BUILTINS_HELP_TEXT mimxrt_help_text
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index 89bb03dfa..3a4b0ef23 100644
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -552,12 +552,6 @@ $(BUILD)/%_gen.c $(HEADER_BUILD)/%.h $(HEADER_BUILD)/%_af_const.h $(BUILD)/%_qst
$(GEN_PINS_SRC:.c=.o): $(GEN_PINS_SRC)
$(call compile_c)
-ifneq ($(FROZEN_MANIFEST),)
-CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
-CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
-CFLAGS += -DMICROPY_MODULE_FROZEN_STR
-endif
-
$(PY_BUILD)/nlr%.o: CFLAGS += -Os -fno-lto
include ../../py/mkrules.mk
diff --git a/ports/qemu-arm/Makefile b/ports/qemu-arm/Makefile
index 40b3062ae..599caf026 100644
--- a/ports/qemu-arm/Makefile
+++ b/ports/qemu-arm/Makefile
@@ -133,12 +133,6 @@ OBJ = $(OBJ_COMMON) $(OBJ_RUN) $(OBJ_TEST)
# List of sources for qstr extraction
SRC_QSTR += $(SRC_COMMON_C) $(SRC_RUN_C) $(LIB_SRC_C)
-ifneq ($(FROZEN_MANIFEST),)
-CFLAGS += -DMICROPY_MODULE_FROZEN_STR
-CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
-CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
-endif
-
all: run
run: $(BUILD)/firmware.elf
diff --git a/ports/renesas-ra/Makefile b/ports/renesas-ra/Makefile
index 2c9f917f3..c49db286f 100644
--- a/ports/renesas-ra/Makefile
+++ b/ports/renesas-ra/Makefile
@@ -430,19 +430,6 @@ $(TOP)/lib/fsp/README.md:
$(ECHO) "fsp submodule not found, fetching it now..."
(cd $(TOP) && git submodule update --init lib/fsp)
-ifneq ($(FROZEN_MANIFEST)$(FROZEN_DIR),)
-# To use frozen source modules, put your .py files in a subdirectory (eg scripts/)
-# and then invoke make with FROZEN_DIR=scripts (be sure to build from scratch).
-CFLAGS += -DMICROPY_MODULE_FROZEN_STR
-endif
-
-ifneq ($(FROZEN_MANIFEST)$(FROZEN_MPY_DIR),)
-# To use frozen bytecode, put your .py files in a subdirectory (eg frozen/) and
-# then invoke make with FROZEN_MPY_DIR=frozen (be sure to build from scratch).
-CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
-CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
-endif
-
define GENERATE_ELF
$(ECHO) "LINK $(1)"
$(Q)$(LD) $(LDFLAGS) -o $(1) $(2) $(LDFLAGS_MOD) $(LIBS)
diff --git a/ports/samd/Makefile b/ports/samd/Makefile
index 211607650..360cf0dd4 100644
--- a/ports/samd/Makefile
+++ b/ports/samd/Makefile
@@ -170,12 +170,6 @@ OBJ += $(addprefix $(BUILD)/, $(LIBM_SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(TINYUSB_SRC_C:.c=.o))
-ifneq ($(FROZEN_MANIFEST),)
-CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
-CFLAGS += -DMICROPY_MODULE_FROZEN_STR
-CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
-endif
-
all: $(BUILD)/firmware.uf2
$(BUILD)/firmware.elf: $(OBJ)
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index e51c0d271..fce81d753 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -530,12 +530,6 @@ $(TOP)/lib/stm32lib/README.md:
$(ECHO) "stm32lib submodule not found, fetching it now..."
(cd $(TOP) && git submodule update --init lib/stm32lib)
-ifneq ($(FROZEN_MANIFEST),)
-CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
-CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
-CFLAGS += -DMICROPY_MODULE_FROZEN_STR
-endif
-
define RUN_DFU
$(ECHO) "Writing $(1) to the board"
$(if $(filter $(USE_PYDFU),1),\
diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index a8981e8f5..188e4be63 100644
--- a/ports/unix/Makefile
+++ b/ports/unix/Makefile
@@ -235,12 +235,7 @@ SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SHARED_SRC_C)
SRC_QSTR_AUTO_DEPS +=
ifneq ($(FROZEN_MANIFEST),)
-# To use frozen code create a manifest.py file with a description of files to
-# freeze, then invoke make with FROZEN_MANIFEST=manifest.py (be sure to build from scratch).
-CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
-CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
CFLAGS += -DMPZ_DIG_SIZE=16 # force 16 bits to work on both 32 and 64 bit archs
-CFLAGS += -DMICROPY_MODULE_FROZEN_STR
endif
CXXFLAGS += $(filter-out -Wmissing-prototypes -Wold-style-definition -std=gnu99,$(CFLAGS) $(CXXFLAGS_MOD))
diff --git a/ports/windows/Makefile b/ports/windows/Makefile
index 7753fa25d..31ac8d8b8 100644
--- a/ports/windows/Makefile
+++ b/ports/windows/Makefile
@@ -87,7 +87,7 @@ SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SHARED_SRC_C)
SRC_QSTR_AUTO_DEPS +=
ifneq ($(FROZEN_MANIFEST),)
-CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool -DMICROPY_MODULE_FROZEN_MPY=1 -DMPZ_DIG_SIZE=16
+CFLAGS += -DMPZ_DIG_SIZE=16
endif
CXXFLAGS += $(filter-out -std=gnu99,$(CFLAGS))
diff --git a/ports/zephyr/mpconfigport.h b/ports/zephyr/mpconfigport.h
index df24e5200..2f3e314db 100644
--- a/ports/zephyr/mpconfigport.h
+++ b/ports/zephyr/mpconfigport.h
@@ -127,8 +127,6 @@ void mp_hal_signal_event(void);
#define MICROPY_HW_MCU_NAME "unknown-cpu"
#endif
-#define MICROPY_MODULE_FROZEN_STR (0)
-
typedef int mp_int_t; // must be pointer size
typedef unsigned mp_uint_t; // must be pointer size
typedef long mp_off_t;
diff --git a/py/mkrules.mk b/py/mkrules.mk
index aa7f77bd2..db81faa7f 100644
--- a/py/mkrules.mk
+++ b/py/mkrules.mk
@@ -183,6 +183,11 @@ ifeq ($(MPY_LIB_DIR),$(MPY_LIB_SUBMODULE_DIR))
GIT_SUBMODULES += lib/micropython-lib
endif
+# Set compile options needed to enable frozen code.
+CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
+CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
+CFLAGS += -DMICROPY_MODULE_FROZEN_STR
+
# to build frozen_content.c from a manifest
$(BUILD)/frozen_content.c: FORCE $(BUILD)/genhdr/qstrdefs.generated.h $(BUILD)/genhdr/root_pointers.h | $(MICROPY_MPYCROSS_DEPENDENCY)
$(Q)test -e "$(MPY_LIB_DIR)/README.md" || (echo -e $(HELP_MPY_LIB_SUBMODULE); false)