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 <a.gatti@frob.it>
This commit is contained in:
Alessandro Gatti
2025-12-20 10:42:44 +01:00
parent 14ea6d7fd8
commit 14152e7f49

View File

@@ -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) {