From c2317a3a8d5f184de2f816078d91be699274b94e Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sat, 27 Jun 2020 13:07:39 +0200 Subject: [PATCH] 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). --- ports/nrf/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 23d5cd20d0..8f73336e0b 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