Hi @Muhammet
Thank you for contacting us ! Is the custom bootloader running from XIP and from M4?
I use to rellocate functions to RAM or any code area using macros and creating specific sections, lets say that you want to place a function like write_flash() into a internal OCRAM. So, as option 1 we can use compiler macros to place a function into OCRAM or any other RAM area you would like.
As option 2, there are also linkscripts, that let you place objects and code into certain areas of the memory. For example move text and data of fsl_flexspi.c, clocks_.c text to located into OCRAM. Could you detail the kind of advice you need?
diego_charles_0-1737151551912.png
I hope to be helpful
Diego