From d01a981a9b924ccb8b25b8d13621c3bba3d04bb4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 7 May 2025 13:49:12 +1000 Subject: [PATCH] py/mpconfig: Enable io.IOBase at core feature level. IOBase is quite an important building block of other parts of the system, such as `mpremote mount` and running .mpy and native tests. This feature costs +244 bytes of firmware size on ARM Thumb2 architectures, which is worth the cost for the extra features it enables. The change here means that `io.IOBase` is now enabled on all nrf boards, (previously it was only nRF52840 and nRF9160) and also B_L072Z_LRWAN1 (there is no change to other ports or boards). Signed-off-by: Damien George --- py/mpconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/mpconfig.h b/py/mpconfig.h index d06932a77..9001b8983 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1469,7 +1469,7 @@ typedef double mp_float_t; // Whether to provide "io.IOBase" class to support user streams #ifndef MICROPY_PY_IO_IOBASE -#define MICROPY_PY_IO_IOBASE (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EXTRA_FEATURES) +#define MICROPY_PY_IO_IOBASE (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_CORE_FEATURES) #endif // Whether to provide "io.BytesIO" class