Don't assume __ICACHE_PRESENT is defined
This seems to only be defined in cmsis files for M7 family MCUs, so it's not for e.g., makerdiary_m60_keyboard which enables loading of native code. Lower MCUs don't ever have icache, so the default is "off".
This commit is contained in:
parent
e74ef8b960
commit
d5d566dc65
|
@ -110,7 +110,7 @@ void mp_emit_glue_assign_native(mp_raw_code_t *rc, mp_raw_code_kind_t kind, void
|
|||
// so that the generated native code which was created in data RAM will
|
||||
// be available for execution from instruction RAM.
|
||||
#if MICROPY_EMIT_THUMB || MICROPY_EMIT_INLINE_THUMB
|
||||
#if __ICACHE_PRESENT == 1
|
||||
#if defined(__ICACHE_PRESENT) && __ICACHE_PRESENT == 1
|
||||
// Flush D-cache, so the code emitted is stored in RAM.
|
||||
MP_HAL_CLEAN_DCACHE(fun_data, fun_len);
|
||||
// Invalidate I-cache, so the newly-created code is reloaded from RAM.
|
||||
|
|
Loading…
Reference in New Issue