How to place different code blocks to different memory spaces

Hi, I am in the process of building up version of PX4 on a Teensy4.1. I started with the boads/nxp/fmur1062-v1. It has two different linker scripts that can be used. One puts all code in the external FlexSPI-NOR space while the other one copies all the code to internal RAM. I found that when I run with all the code in FlexSPI-NOR ‘top’ shows me that the system is overloaded. On the other hand if I put everything in RAM, then I am IDLE 85% of the time time (good news), but I run out of memory when mavlink -d /dev/ttyACM0 starts up (bad news). So I’m hoping to do something in the middle, putting the heavily used blocks in RAM, but leaving other stuff in SPI-FLASH. I’m familiar with the linker file details but before I go down that path I wanted to know if there is any standard way of doing this within PX4.
I see in arm_internal.h the ramfunc macro which appears to be the start of something, but it doesn’t appear to be used anywhere in the code.
Has anyone done this?