Is there a code example of S32K1xx in-circuit flash reprogramming. What I mean is a code embedded in an application. When it is called externally (interrupt) it copied itself (and all associated sub functions) into RAM and run from there to accept (serially, via uart), a new version and program it into the flash.
I have done almost everything:
- copied the code to the RAM
- verified all called functions are within the copied code
- disabled all interrupts
- jump to the right location in the ram
However, I'm experiencing exception once it starts running from ram.
I would expect it if the M0+ core would have an MMU, but it doesn't. Should I define ram as an executable space somewhere?