summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2020-03-04 21:56:44 +1100
committerDamien George <damien.p.george@gmail.com>2020-04-05 15:02:06 +1000
commit073b9a5eb888b26be7ce4c65e9649b6c3857ba39 (patch)
tree3edb68df0408646d31123024403d95b37f40dabd
parentdef76fe4d9bbc2c342594dc05861b24d7165d274 (diff)
ports: Enable error text compression for various ports, but not all.
Enabled on: bare-arm, minimal, unix coverage/dev/minimal, stm32, esp32, esp8266, cc3200, teensy, qemu-arm, nrf. Not enabled on others to be able to test the code when the feature is disabled (the default case). Code size change for this commit: bare-arm: -600 -0.906% minimal x86: -308 -0.208% unix x64: +0 +0.000% unix nanbox: +0 +0.000% stm32: -3368 -0.869% PYBV10 cc3200: -1024 -0.558% esp8266: -2512 -0.368% GENERIC esp32: -2876 -0.205% GENERIC[incl -3168(data)] nrf: -1708 -1.173% pca10040 samd: +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
-rw-r--r--ports/bare-arm/Makefile3
-rw-r--r--ports/cc3200/Makefile4
-rw-r--r--ports/esp32/Makefile2
-rw-r--r--ports/esp8266/Makefile2
-rw-r--r--ports/minimal/Makefile3
-rw-r--r--ports/nrf/Makefile3
-rw-r--r--ports/qemu-arm/Makefile3
-rw-r--r--ports/stm32/Makefile3
-rw-r--r--ports/teensy/Makefile3
-rw-r--r--ports/unix/variants/coverage/mpconfigvariant.mk1
-rw-r--r--ports/unix/variants/dev/mpconfigvariant.mk2
-rw-r--r--ports/unix/variants/minimal/mpconfigvariant.mk1
12 files changed, 30 insertions, 0 deletions
diff --git a/ports/bare-arm/Makefile b/ports/bare-arm/Makefile
index 800f4093d..72d5f1a27 100644
--- a/ports/bare-arm/Makefile
+++ b/ports/bare-arm/Makefile
@@ -3,6 +3,9 @@ include ../../py/mkenv.mk
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
+
# include py core make definitions
include $(TOP)/py/py.mk
diff --git a/ports/cc3200/Makefile b/ports/cc3200/Makefile
index 81531b108..560fc8e96 100644
--- a/ports/cc3200/Makefile
+++ b/ports/cc3200/Makefile
@@ -33,6 +33,10 @@ FLASH_SIZE_LAUNCHXL = 1M
ifeq ($(BTARGET), application)
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
+
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
+
# include MicroPython make definitions
include $(TOP)/py/py.mk
include application.mk
diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile
index 7033a3dd2..7f43f9a87 100644
--- a/ports/esp32/Makefile
+++ b/ports/esp32/Makefile
@@ -27,6 +27,8 @@ QSTR_DEFS = qstrdefsport.h
QSTR_GLOBAL_DEPENDENCIES = $(BOARD_DIR)/mpconfigboard.h
QSTR_GLOBAL_REQUIREMENTS = $(SDKCONFIG_H)
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
MICROPY_PY_USSL = 0
MICROPY_SSL_AXTLS = 0
MICROPY_PY_BTREE = 1
diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile
index 60eb7c080..85a04c070 100644
--- a/ports/esp8266/Makefile
+++ b/ports/esp8266/Makefile
@@ -19,6 +19,8 @@ include ../../py/mkenv.mk
QSTR_DEFS = qstrdefsport.h #$(BUILD)/pins_qstr.h
QSTR_GLOBAL_DEPENDENCIES = $(BOARD_DIR)/mpconfigboard.h
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
MICROPY_PY_USSL = 1
MICROPY_SSL_AXTLS = 1
AXTLS_DEFS_EXTRA = -Dabort=abort_ -DRT_MAX_PLAIN_LENGTH=1024 -DRT_EXTRA=4096
diff --git a/ports/minimal/Makefile b/ports/minimal/Makefile
index d8afa068d..b44dda7ac 100644
--- a/ports/minimal/Makefile
+++ b/ports/minimal/Makefile
@@ -5,6 +5,9 @@ CROSS = 0
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
+
# include py core make definitions
include $(TOP)/py/py.mk
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index d898559a1..b4d6f5929 100644
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -38,6 +38,9 @@ endif
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
+
# include py core make definitions
include ../../py/py.mk
diff --git a/ports/qemu-arm/Makefile b/ports/qemu-arm/Makefile
index f5329fe4d..9641e2425 100644
--- a/ports/qemu-arm/Makefile
+++ b/ports/qemu-arm/Makefile
@@ -4,6 +4,9 @@ include ../../py/mkenv.mk
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
+
# include py core make definitions
include $(TOP)/py/py.mk
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index 7d372f4ae..38c3491b1 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -21,6 +21,9 @@ QSTR_GENERATED_HEADERS = $(BUILD)/pins_qstr.h $(BUILD)/modstm_qstr.h
QSTR_DEFS = qstrdefsport.h $(QSTR_GENERATED_HEADERS)
QSTR_GLOBAL_DEPENDENCIES = mpconfigboard_common.h $(BOARD_DIR)/mpconfigboard.h $(QSTR_GENERATED_HEADERS)
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
+
# File containing description of content to be frozen into firmware.
FROZEN_MANIFEST ?= boards/manifest.py
diff --git a/ports/teensy/Makefile b/ports/teensy/Makefile
index 769b7e39d..adfc8d74f 100644
--- a/ports/teensy/Makefile
+++ b/ports/teensy/Makefile
@@ -3,6 +3,9 @@ include ../../py/mkenv.mk
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
+
# include py core make definitions
include $(TOP)/py/py.mk
diff --git a/ports/unix/variants/coverage/mpconfigvariant.mk b/ports/unix/variants/coverage/mpconfigvariant.mk
index 056a5fd3f..0bfc4f84c 100644
--- a/ports/unix/variants/coverage/mpconfigvariant.mk
+++ b/ports/unix/variants/coverage/mpconfigvariant.mk
@@ -12,6 +12,7 @@ LDFLAGS += -fprofile-arcs -ftest-coverage
FROZEN_MANIFEST = manifest_coverage.py
+MICROPY_ROM_TEXT_COMPRESSION = 1
MICROPY_VFS_FAT = 1
MICROPY_VFS_LFS1 = 1
MICROPY_VFS_LFS2 = 1
diff --git a/ports/unix/variants/dev/mpconfigvariant.mk b/ports/unix/variants/dev/mpconfigvariant.mk
index 751a748f6..d7067e99c 100644
--- a/ports/unix/variants/dev/mpconfigvariant.mk
+++ b/ports/unix/variants/dev/mpconfigvariant.mk
@@ -1 +1,3 @@
PROG ?= micropython-dev
+
+MICROPY_ROM_TEXT_COMPRESSION = 1
diff --git a/ports/unix/variants/minimal/mpconfigvariant.mk b/ports/unix/variants/minimal/mpconfigvariant.mk
index 58ee64f83..3916c8c9a 100644
--- a/ports/unix/variants/minimal/mpconfigvariant.mk
+++ b/ports/unix/variants/minimal/mpconfigvariant.mk
@@ -5,6 +5,7 @@ PROG = micropython-minimal
FROZEN_MANIFEST =
+MICROPY_ROM_TEXT_COMPRESSION = 1
MICROPY_PY_BTREE = 0
MICROPY_PY_FFI = 0
MICROPY_PY_SOCKET = 0