summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/mimxrt/Makefile5
-rw-r--r--ports/mimxrt/machine_led.c2
-rw-r--r--ports/mimxrt/machine_sdcard.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/ports/mimxrt/Makefile b/ports/mimxrt/Makefile
index e5a14d010..b73d3f4db 100644
--- a/ports/mimxrt/Makefile
+++ b/ports/mimxrt/Makefile
@@ -40,6 +40,9 @@ include ../../py/mkenv.mk
# Include micropython configuration board makefile
include $(BOARD_DIR)/mpconfigboard.mk
+# MicroPython feature configurations
+MICROPY_ROM_TEXT_COMPRESSION ?= 1
+
# File containing description of content to be frozen into firmware.
FROZEN_MANIFEST ?= boards/manifest.py
@@ -290,6 +293,8 @@ SRC_QSTR += $(SRC_C) $(SHARED_SRC_C) $(GEN_PINS_SRC)
CFLAGS += -g # always include debug info in the ELF
ifeq ($(DEBUG),1)
CFLAGS += -Og
+# Disable text compression in debug builds
+MICROPY_ROM_TEXT_COMPRESSION = 0
else
CFLAGS += -Os -DNDEBUG
endif
diff --git a/ports/mimxrt/machine_led.c b/ports/mimxrt/machine_led.c
index 8dd74b32b..35743697f 100644
--- a/ports/mimxrt/machine_led.c
+++ b/ports/mimxrt/machine_led.c
@@ -44,7 +44,7 @@ STATIC mp_obj_t led_obj_make_new(const mp_obj_type_t *type, size_t n_args, size_
// Check led id is in range
if (!(1 <= led_id && led_id <= NUM_LEDS)) {
- mp_raise_msg_varg(&mp_type_ValueError, "LED(%d) doesn't exist", led_id);
+ mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("LED(%d) doesn't exist"), led_id);
}
// Return reference to static object
diff --git a/ports/mimxrt/machine_sdcard.c b/ports/mimxrt/machine_sdcard.c
index 35e1ef7ee..496eb9353 100644
--- a/ports/mimxrt/machine_sdcard.c
+++ b/ports/mimxrt/machine_sdcard.c
@@ -67,7 +67,7 @@ STATIC mp_obj_t sdcard_obj_make_new(const mp_obj_type_t *type, size_t n_args, si
mp_int_t sdcard_id = args[SDCARD_INIT_ARG_ID].u_int;
if (!(1 <= sdcard_id && sdcard_id <= MP_ARRAY_SIZE(mimxrt_sdcard_objs))) {
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "SDCard(%d) doesn't exist", sdcard_id));
+ nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("SDCard(%d) doesn't exist"), sdcard_id));
}
mimxrt_sdcard_obj_t *self = &mimxrt_sdcard_objs[(sdcard_id - 1)];