Hello,
I am trying to find bits of information on MMU & memory usage on ESP32. In particular: how we can (can we?) execute code, which is located on stack? Or code must be located in IRAM?
Is it possible to disable write-protection for the IRAM so I can modify some code, invalidate icache and jump to that code?
Thanks!
Executing code on stack. Writing to IRAM. Possible?
Re: Executing code on stack. Writing to IRAM. Possible?
The (original) ESP32 can only execute code in IRAM, not in DRAM. Since the stack tends to be in DRAM you cannot execute code from there. You can allocate a chunk of IRAM using heap_malloc_caps(), put your code in there, then jump to it or call into it. I don't think the (original) ESP32 has write protection in place for IRAM, but later chips (ESP32-Sx, ESP32-Cx, ...) may have.
Re: Executing code on stack. Writing to IRAM. Possible?
Thank you for the reply!
Now I see why there is a problem with C trampolines.
Now I see why there is a problem with C trampolines.
Thanks!
Slava.
Slava.
Who is online
Users browsing this forum: No registered users and 1 guest
