mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
ports/nrf: Fix build.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
parent
b5a7a999a7
commit
b2b310b0d2
@ -37,6 +37,7 @@
|
||||
#include "py/stackctrl.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/compile.h"
|
||||
#include "py/persistentcode.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "shared/readline/readline.h"
|
||||
#include "gccollect.h"
|
||||
@ -412,3 +413,16 @@ void MP_WEAK __assert_func(const char *file, int line, const char *func, const c
|
||||
printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line);
|
||||
__fatal_error("Assertion failed");
|
||||
}
|
||||
|
||||
#if MICROPY_EMIT_MACHINE_CODE
|
||||
void *nrf_native_code_commit(void *buf, unsigned int len, void *reloc) {
|
||||
(void)len;
|
||||
if (reloc) {
|
||||
// Native code in RAM must execute from the IRAM region at 0x00800000, and so relocations
|
||||
// to text must also point to this region. The MICROPY_MAKE_POINTER_CALLABLE macro will
|
||||
// adjust the `buf` address from RAM to IRAM.
|
||||
mp_native_relocate(reloc, buf, (uintptr_t)MICROPY_MAKE_POINTER_CALLABLE(buf) & ~1);
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user