There is a setting "Link application to RAM" in C/C++build->Settings, which you might try.
I am not familiar with the method that MCUXpresso supports for RAM execution, but know of other IDEs supporting a direct load via the debugger. Otherwise, the code is flashed, and copied to RAM at runtime.
Anyway, I suppose this method will not work for many projects. First, the RAM is much smaller than the Flash, so the code size is quite limited. And second, code than needs to share the RAM with data and stack.
I used RAM-based execution only for special purposes, like flashing routines in a bootloader with single-bank Flash.
Hi, Sebastiano,
I suppose that you do not initialize the MPU module, pls refer to an12423.pdf
https://www.nxp.com.cn/docs/en/application-note/AN12423.pdf
Hope it can help you
BR
Xiangjun Rong