How to flush instruction cache?


I'm working on a JIT and I'd like to be able to flush icache. I've tried writing a 0 to ICIALLU (at address 0xE000EF50) and I've also tried the STM32CubeF7 library's InvalidateICache(). However, all methods I've tried result in the device crashing. I'm not sure what to do at this point except to execute 4kb of nops.

Right, we don't provide direct access to system registers. I'll file a feature request for a cache-flushing function on the C API. My first though was nah, that's too niche, but now I really want to see what you can do with JIT code. :slight_smile:

I'll try and get that into the 2.0.0 release!


Thank you so much! I hope not to disappoint :slight_smile:

1 Like