Placing Code and Data in RAM

Placing code and data into RAM is more complicated. As the content in RAM cannot be saved when turning power off, you first need to save the code and data in flash and then make a copy to RAM in runtime.

Following are the steps to relocate code and data in a new RAM segment.