Hi,
there are two possible ways.
1) I will create a special RAM space and create a function as a RAM function in the Code Warriror. Then the process automatically creates a special function which is stored in the flash and after reset the copydown function (automatically added by codewarrior) copies the function from the flash to ram. The linker knows the function as a ram function and application executes the function always from ram.
2) The second approach is to exclude some ram space form the usage by codewarrior and use it for own purposes or use the stack as the space for temporary "ram function" which is copied
a) always before usage from flash to ram and then it is executed. The difference is that if i copy it to given (the same) space then I can call the function always from the same address. however, iif I copy it to stack then addres is always different.
b) only once after reset to the given ram space and then it is executed from known address by pointer to a function.
In these cases, the process is not automatic as in the item 1), so the function must by stored into a flash as a PIC (position independent code).
As an example I can direct you to my answer in the thread how to copy rom to ram(mc9s12xep100)
however, if it does not help, could you please refine the question on the basis of my description to do not prepare redundant answer/example.
Best regards,
Ladislav