Other Parts Discussed in Thread: TMS320F28379D
Hi,
After a week(!) of digging forum, datasheets, lines of code then trial and error I have managed to partially bend GUI Composer v2 to my will. I'm writing this post so no one else has to go through my pain. There is one major problem with connection procedure - after a flash and just before connection there is a reset of microcontroller and also individually a reset of RAM. When the debugger is connected TMS320F28379D by default goes to infinite loop and never boots. There are two ways to fix this. One needs the program to reside in FLASH, but is simpler. The other fixes the problem for good.
Solution one (FLASH):
If we want to boot to FLASH while in debug EMU_KEY and EMU_BMODE values have to programmed. It can by done in CCS under Scripts->EMU Boot Mode Select, but it is done only once, resets after uC reset and doesn't help with GUI Composer v2. The fix is to add few lines of code like below:
After a GUI Composer v2 flash, the program runs for few seconds before connection and is able to load this register. After reset during connection it will boot properly. This method also helps in CCS when debugging a FLASH application which involves resets. However if the program was loaded into RAM, the content would be erased this way. It would be painful to resign from loading to RAM, because it is few times faster than loading into FLASH.
Solution two (full fix):
It requires modifying .gel file that is used by GUI Composer v2, which is located in C:\Users\YourUserName\AppData\Local\Texas Instruments\TICloudAgent\loaders\ccs_base\emulation\gel. For this uC gel file is named f28379d_cpu1. Open it with notepad and then comment out lines in OnTargetConnect() as in the image below:
This way the RAM will be intact after connection.