aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Ruben Bakke2020-06-27 13:07:39 +0200
committerDamien George2020-07-01 22:54:52 +1000
commitc2317a3a8d5f184de2f816078d91be699274b94e (patch)
tree951cf4d565676faa2cce7fd36fbddf6b9e2e454e
parentf22f7b285e69aa05ce2dcf1e26de626dd1b1599d (diff)
nrf/Makefile: Disable ROM text compression when compiling for debug.
When compiling for debug (-O0) the .text segment cannot fit the flash region when MICROPY_ROM_TEXT_COMPRESSION=1, because the compiler does not optimise away the large if-else chain used to select the correct compressed string. This commit enforces MICROPY_ROM_TEXT_COMPRESSION=0 when compiling for debug (DEBUG=1).
-rw-r--r--ports/nrf/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index 23d5cd20d..8f73336e0 100644
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -39,7 +39,9 @@ endif
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
# MicroPython feature configurations
+ifeq ($(DEBUG), 0)
MICROPY_ROM_TEXT_COMPRESSION ?= 1
+endif
# include py core make definitions
include ../../py/py.mk