You’d need to check out how you declare functions/files to run from the ram with your compiler. It will be linked to a specific RAM address and the startup code will copy it to the correct place in ram from the flash.
One would need to be aware of whether the code is free standing or has dependencies outside itself. But in the general sense I can copy code to RAM and run it there.
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..