If you wish to have specific routines in your program be executed from RAM, use the -rom option of the optimizing linker as in the procedure described below.
Allocate sections to addresses in ROM where you wish to place the routines and the corresponding addresses in RAM, respectively. |
Prepare a separate routine for transfer that will lead to the following actions and include it in your program. |
(2-1) Copy the target routines from the ROM sections to the corresponding RAM sections.
(2-2) Call the target routines from RAM.
In the process of building your program, run the optimizing linker with the following settings for such code. |
(3-1) As parameter ROMsection of the -rom option, specify the name of the ROM section where the target
routine for copying is to be allocated.
(3-2) As parameter RAMsection of the -rom option, specify the name of the RAM section from which you wish