I am programming my embedded system that is based on the SAMD51 chip with C++. This is the memory map of the chip:
What I want is to make a function in the RAM. The function should not be in the flash, but in RAM. So that I can JMP
to the function and it works all from the ram.
Why I want this: I will create an application that essentially overwrites itself, and I want the writing function to be in the ram, so that it does not overwrite the writing function. I am well aware that this could corrupt data on a sudden power loss.