Skip to content
Snippets Groups Projects
Commit 81316fa4 authored by Damien George's avatar Damien George
Browse files

py/asmbase: Add MP_PLAT_COMMIT_EXEC option for handling exec code.

If a port defines MP_PLAT_COMMIT_EXEC then this function is used to turn
RAM data into executable code.  For example a port may want to write the
data to flash for execution.  The function must return a pointer to the
executable data.
parent c8746e1e
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,11 @@ static inline size_t mp_asm_base_get_code_size(mp_asm_base_t *as) { ...@@ -62,7 +62,11 @@ static inline size_t mp_asm_base_get_code_size(mp_asm_base_t *as) {
} }
static inline void *mp_asm_base_get_code(mp_asm_base_t *as) { static inline void *mp_asm_base_get_code(mp_asm_base_t *as) {
#if defined(MP_PLAT_COMMIT_EXEC)
return MP_PLAT_COMMIT_EXEC(as->code_base, as->code_size);
#else
return as->code_base; return as->code_base;
#endif
} }
#endif // MICROPY_INCLUDED_PY_ASMBASE_H #endif // MICROPY_INCLUDED_PY_ASMBASE_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment