Hello fei Gao,
I can't immediately see how this can be done as part of a build step - the relocation items are just part(s) a binary that will change during development.
Also, you may already have done this but I would suggest you take a look at the MCUXpresso IDE User Guide V11.0:
- 18.13 Placement of specific code/data items
- 18.15 FreeMarker Linker Script Template Examples
These options may simplify the generation (and placement) of code to be relocated.
One rather crude option might be to save the RAM section after the relocation has been performed. The default Memory view in MCUXpresso IDE supports Export and Import options - once done the binary file could be converted to srecord format.
In MCUXpresso IDE v11.0.0, the new Image Information feature should make it easier to locate the address range of the relocated area to capture.
I hope this helps,
Yours,
MCUXpresso IDE Support