Skip to content

Commit

Permalink
ports: Enable error text compression for various ports, but not all.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jimmo authored and dpgeorge committed Apr 5, 2020
1 parent def76fe commit 073b9a5
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ports/bare-arm/Makefile
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions ports/cc3200/Makefile
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions ports/esp32/Makefile
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions ports/esp8266/Makefile
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ports/minimal/Makefile
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions ports/nrf/Makefile
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions ports/qemu-arm/Makefile
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions ports/stm32/Makefile
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions ports/teensy/Makefile
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions ports/unix/variants/coverage/mpconfigvariant.mk
Expand Up @@ -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
2 changes: 2 additions & 0 deletions ports/unix/variants/dev/mpconfigvariant.mk
@@ -1 +1,3 @@
PROG ?= micropython-dev

MICROPY_ROM_TEXT_COMPRESSION = 1
1 change: 1 addition & 0 deletions ports/unix/variants/minimal/mpconfigvariant.mk
Expand Up @@ -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
Expand Down

0 comments on commit 073b9a5

Please sign in to comment.