This document provides some sample codes and steps for relocating Code and Data into RAM/FLASH. Please look at them with projects in attachment. It is based on “MCUXpresso_IDE_User_Guide.pdf”, so about the understanding of some macros, you can check on that document.
This document is based on FRDM-K64, MCUXpressoIDE_10.0.2_411. You can use it on other chips too.