From c303b15f10d2925edf11392058e30e86deac9b91 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Fri, 7 May 2021 09:42:26 +0200 Subject: [PATCH] mimxrt: Enable frozen modules. --- ports/mimxrt/Makefile | 3 +++ ports/mimxrt/boards/manifest.py | 1 + ports/mimxrt/mpconfigport.h | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 ports/mimxrt/boards/manifest.py diff --git a/ports/mimxrt/Makefile b/ports/mimxrt/Makefile index 0c893f9634..b4f581ccdc 100644 --- a/ports/mimxrt/Makefile +++ b/ports/mimxrt/Makefile @@ -15,6 +15,9 @@ include $(BOARD_DIR)/mpconfigboard.mk QSTR_DEFS = qstrdefsport.h QSTR_GLOBAL_DEPENDENCIES = $(BOARD_DIR)/mpconfigboard.h +# MicroPython feature configurations +FROZEN_MANIFEST ?= boards/manifest.py + # Include py core make definitions include $(TOP)/py/py.mk diff --git a/ports/mimxrt/boards/manifest.py b/ports/mimxrt/boards/manifest.py new file mode 100644 index 0000000000..c80309cf67 --- /dev/null +++ b/ports/mimxrt/boards/manifest.py @@ -0,0 +1 @@ +freeze("$(PORT_DIR)/modules") diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h index 72e804f676..63ee5ea5cc 100644 --- a/ports/mimxrt/mpconfigport.h +++ b/ports/mimxrt/mpconfigport.h @@ -48,6 +48,8 @@ #define MICROPY_ENABLE_SOURCE_LINE (1) #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE) #define MICROPY_CAN_OVERRIDE_BUILTINS (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_STR_COUNT (0)