Is there any way to configure CCS 5.5 to assert a system reset before loading a program?
The use case is downloading a SYS/BIOS program to a AM335x starter kit using the built in XDS100v2. SYS/BIOS enables the MMU such that:
a) Power on the AM335x starter kit
b) Download the program, successfully in which the AM3358_StarterKit.gel script successfully configures the target hardware
c) Terminate the debug session.
d) Restart the debug session. Because of the way the SYS/BIOS program has configured the MMU, the AM3358_StarterKit.gel OnTargetConnect function fails with an error when it attempts to configure the target hardware:[quote]CortxA8: Output: **** AM3358_SK Initialization is in progress ..........
CortxA8: Output: **** AM335x ALL PLL Config for OPP == OPP100 is in progress .........
CortxA8: GEL: Error while executing OnTargetConnect(): Target failed to read 0x44E10040 at (*((unsigned int *) (0x44E10000+0x40))>>22) [AM3358_StarterKit.gel:379] at GetInputClockFrequency() [AM3358_StarterKit.gel:450] at ARM_OPP100_Config() [AM3358_StarterKit.gel:370] at AM3358_SK_Initialization() [AM3358_StarterKit.gel:356] at OnTargetConnect() .[/quote]
To prevent the GEL script failing with an error on the 2nd and subsequent download a System Reset is required to get the AM3359 into the initial reset state.
I couldn't find a way in the CCS debug properties to generate a System Reset before loading the program. The only way I found to generate a System Reset before loading the program was to add the following to the AM3358_StarterKit.gel script:
StartUp() { GEL_AdvancedReset("System Reset"); GEL_TextOut("Performed System Reset\n"); }
While a system reset can be generated by modifying the GEL script, I think it would be useful if the CCS project properties could specify a System Reset before loading a program, to get a target into a known state.