I am programming the SPI1 flash memory on a custom DSP design using the TMS320C6745. I generate a header file using AISGEN and then include that in a project that writes to flash. I run the program using the emulator. Because of the size of the image, I had to locate the nvram_image array in the header file in a data section in SDRAM. In order for this to work, the PSC must be enabled and the parameters for EMIFB must be initialized. One way to do that is to run a program that initializes EMIFB and terminate. Then without powering down, run the flash program. This works but is cumbersome. A second way that should work is to use a Gel file.
Reference the TI wiki:
http://processors.wiki.ti.com/index.php/GSG:CCSv5.0_Adding_GEL_files_to_a_target_configuration
By putting the EMIFB startup code in OnPreFileLoaded() function in the gel file, it should initialize the EMIFB before loading the .out file. However, it does initialize but apparently not until after the .out is loaded. See TI Application Report SPRAA74A. If I terminate and then connect again, the EMIFB is initialized and I can run the program. How can I get the EMIFB initialized so that I can run the program.