aboutsummaryrefslogtreecommitdiff
path: root/ports/qemu-arm/Makefile
diff options
context:
space:
mode:
authorJim Mussared2019-08-19 10:59:27 +1000
committerDamien George2019-08-20 15:14:08 +1000
commit0bd1eb80ff49dd0d4ad0c369a83a5aadea995944 (patch)
tree49befa6047dd9e86e28b78675800f0678aa85cc6 /ports/qemu-arm/Makefile
parent4ab5156c01bfd4a6304e26b1dc2d34163b8637c0 (diff)
qemu-arm: Add testing of frozen native modules.
- Split 'qemu-arm' from 'unix' for generating tests. - Add frozen module to the qemu-arm test build. - Add test that reproduces the requirement to half-word align native function data.
Diffstat (limited to 'ports/qemu-arm/Makefile')
-rw-r--r--ports/qemu-arm/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/ports/qemu-arm/Makefile b/ports/qemu-arm/Makefile
index 03a8afe77..c730c8297 100644
--- a/ports/qemu-arm/Makefile
+++ b/ports/qemu-arm/Makefile
@@ -114,6 +114,14 @@ 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_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
+MPY_CROSS_FLAGS += -march=armv7m
+endif
+
all: run
run: $(BUILD)/firmware.elf