Hi @rantonetti ,
Your secondary bootloader in the SDRAM, but loaded in the external flash, right?
Your real app is running the in the ocram.
To your secondary bootloader, which in fact is one special app which is not the XIP, you can generate the sdram secondary bootloader image, then use the tool, eg, MCUBootutility, SEC tool to download to your external flash, also need to add the DCD, you can refer to my post, just the target downloaded is the flash not the sd card:
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/RT1050-SDRAM-app-code-boot-from-SDcard-burn-with...
Then, to your ocram app, you need to generate the app.bin file, and use your secondary bootloader provided download method to download the app. eg, it is support the ISP, then you just need to use the ISP method to download. Just determined by your secondary bootloader ota method.
Wish it helps you!
If you still have question about it, please kindly let me know.
Best Regards,
kerry