Hi Alice,
Thank you for your answer.
I need to better specify the project and correct my previous post: the custom board is based on K65FX1M0M18 chip (the K65FN2M0M18 chip is in the prototype board, not in the final one), so there is 1 MB flash.
1 MB flash is not enough to store the application (and maybe neither 2 MB), so there a 4 MB external flash (29LV320) where the application is stored. Then the boot loader (stored in the internal flash) copies the application from the external flash to SDRAM: this is the reason why I have to download the code to SDRAM using debugger in the debug phase.
I don't think that the only workflow I can use is write the application in the external flash then execute the boot loader that copies the application in the SDRAM execute it and finally attach with the debugger to the running application. The option to load the application to debug directly to SDRAM using the debugger was avaliable in the tool I use for 15 years in my past work (SDS debugger with Coldfire processor).
Many thanks
Biafra