From 14152e7f49fffdfaa404bf33e00ad247c70e1a4a Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Sat, 20 Dec 2025 10:42:44 +0100 Subject: [PATCH] nrf/main: Allocate executable memory when needed. This commit lets the nRF port use the new MICROPY_PERSISTENT_CODE_LOAD_NATIVE configuration entry. The nRF port needs a special procedure to allocate memory used to hold executable native code. This functionality was gated behind the presence of a native emitter and thus its inclusion condition had to be updated. Signed-off-by: Alessandro Gatti --- ports/nrf/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/main.c b/ports/nrf/main.c index e5d7828a8..7278a646a 100644 --- a/ports/nrf/main.c +++ b/ports/nrf/main.c @@ -368,7 +368,7 @@ void MP_WEAK __assert_func(const char *file, int line, const char *func, const c __fatal_error("Assertion failed"); } -#if MICROPY_EMIT_MACHINE_CODE +#if MICROPY_EMIT_INLINE_THUMB || MICROPY_ENABLE_NATIVE_CODE void *nrf_native_code_commit(void *buf, unsigned int len, void *reloc) { (void)len; if (reloc) {