This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28388S: Attaching Debugger Under CCS12

Part Number: TMS320F28388S


Tool/software:

Greetings,

                Under CCS10, the previous version we have been using, we have a procedure for attaching to a device without affecting it.  This has been working well for years.  Now under CCS12, when we do the same thing, it always halts the target.  Our steps are:

  1. Use a GEL script which does not modify anything
  2. In Project Properties->Debug, uncheck “Halt the target on a connect”.
  3. In Debug Configurations, select the project, then the Program tab and click “Load symbols only”.
  4. In the Target tab, uncheck “Halt the target on a connect”, if it isn’t already.
  5. Click Debug

Is there something I need to add to this?

Thank you,

 Ed

  • Hi Ed, 

    I was able to connect to a device without halting it by following your steps and using a default GEL file with the GEL_Reset() in OnTargetConnect() commented out. Can you try this? 

    For F28388S.gel (line 28 commented out):

    OnTargetConnect()
    {
    
        *(int *)0x5F412 =0x000F;      /* RAM INIT FOR M0/M1/D0/D1 Memory  */
        *(int *)0x5F432 =0x00FF;      /* RAM INIT FOR LS0..LS7  Memory    */
        *(int *)0x5F452 =0xFFFF;      /* RAM INIT FOR GS0..GS15 Memory    */
    
        if (GEL_IsInRealtimeMode())     /* If in real-time-mode */
        {
        }
        else                            /* Put device into C28x Mode */
        {
            C28x_Mode();   
        }
    
        F28388s_Memory_Map();        /* Initialize the CCS memory map */      
    
    /* Check to see if CCS has been started-up with the DSP already */
    /* running in real-time mode.  The user can add whatever        */
    /* custom initialization stuff they want to each case.          */
    
        if (GEL_IsInRealtimeMode())     /* Do real-time mode target initialization */
        {
    
        }
        else                            /* Do stop-mode target initialization */
        {
            // GEL_Reset();                /* Reset DSP */
        }
        
        /* If CM isn't out of reset, boot CM to wait boot */
        if(*(unsigned long *) 0x0005DC00 == 0x1)
        {
            CM_releaseAndBootToWaitBoot();
        }  
    }

    Best,
    Matt

  • Hi Matt,

                    I tried that and it affected the program.  So I commented out the RAM INIT code which I believe was causing the interference.  I also commented out the CM core code because I am not currently using it.  With that, it still stops the processor when I attach the debugger.

    Thank you,

    Ed

  • Hi Ed,

    Let me check on an F2838x device as well, I'll update you by tomorrow morning. 

    Best,

    Matt

  • Hi Ed,

    I was able to avoid the halt on connect on an F28388D by doing the following:

    1. Project Properties > Debug > Program/Memory Load Options > Connection Options: Uncheck "Halt the target on a connect" and "Reset the target on a connect"
    2. Debug As > Debug Configurations > project_ccxml_filename > Program > Loading options: Select "Load symbols only"
    3. Debug As > Debug Configurations > project_ccxml_filename > Target > Program/Memory Load Options > Connection Options: Uncheck "Halt the target on a connect" and "Reset the target on a connect"
    4. Open the device's GEL file (In debug session, go to Tools > GEL Files) and comment out the RAM INIT and GEL_Reset() lines in OnTargetConnect(). Then, make sure the GEL file is saved.

    Relaunch a debug session and it should connect without halting the device.

    Best,
    Matt

     

  • Hi Matt,

    The "Reset the target on connect" is unchecked by default.  So I didn't need to make any changes there for any of the steps above.  Everything is set to "Load symbols only" and I also commented out everything in the GEL file.

    As an additional experiment, even though I'm not using it at the moment, I set the CM core to load symbols only and to not halt or reset.  CCS isn't trying to do anything with it, but I though I would try it anyhow.

    But still the result is the same.  It stops the processor (CPU1) when it connects.

    Thanks,

    Ed

  • Hi Ed,

    That is unusual. Can you share your GEL file? 

    Best,

    Matt

  • Hi Matt,

    At the moment, everything is commented out.  So it's logically empty.

    Thanks,

    Ed

  • Hi Ed,

    What program are you running on the device when you attempt to connect? 

    Best,
    Matt

  • Hi Matt,

    I'm running our product code.  It has been doing this since I upgraded to CCS 12.5.0 on the 388S.  It works fine with CCS 10.4.0 on the 379D.

    Thanks,

    Ed

  • Hi Ed,

    Can you try updating to CCS 12.8.1 and try again? That's the version (12.8.1.00005) I've confirmed this procedure on.

    Best,

    Matt

  • Hi Matt,

    CCS 12.8.1 attaches and CPU1 keeps running.  But the CLA was suspended.  It was setup to load symbols only and Halt on Connect was unchecked and grayed out.

    So that fixed part of the issue.

    Thanks,

    Ed

  • Hi Ed,

    I'm happy to hear that it worked for CPU1. Did you modify the GEL for the CLA too?

    Best,

    Matt

  • Hi Matt,

    There is no GEL file specified for the CLA.

    Thanks,

    Ed

  • Hi Ed,

    Apologies, you are right. Let me get back to you by the end of the day.

    Best,

    Matt

  • Hi Ed,

    The CLA expert is out of office till next week, but I just want to confirm that you do have code executing in the CLA at that time? 

    Best,

    Matt

  • Hi Matt,

    Yes, I have code executing in both CPU1 and its CLA when the debugger is being attached.

    Thank you,

    Ed

  • Hi Ed,

    I'm re-assigning to the CLA expert to address this issue as soon as possible.

    Best,

    Matt

  • Hi Ed,

    By nature, the CLA is automatically "halted" until fully configured (and memory is allocated) by the main CPU and one of its tasks are triggered. In this way it is different than the main CPU since it isn't necessarily running code at all times, but simply waiting for a task to be triggered. Can you verify the CLA was actually running a task when you attached the debugger? To do this, I would suggest toggling GPIOs inside the tasks.

    Best Regards,

    Delaney

  • Hi Delaney,

    In the circumstances in which I have been attaching the debugger, the CLA would not have been running.

    So I tried attaching it to a running system where the CLA is running a little over 10% of the time.  When I attached the debugger, the CLA was suspended at address 0, and a reset occurred on the CPU causing it to stop in the TI Bootloader.  The reset was most likely a watchdog reset which occurred due to the fact that the CPU was waiting for the CLA to stop running (I haven’t added a timeout to the CPU code yet).  But the CLA had stopped due to the process of attaching.

    I restarted the system and tried again.  This time the CPU continued to run, and the CLA was suspended at an MSTOP instruction.  It seems to be stuck at that instruction as the run time of the CLA was effectively 0.

    BTW, at the moment, we are doing a SW start of the CLA.

    Thank you,

    Ed

  • Hi Ed,

    After consulting with experts on the CCS team, I have found that connecting to the CLA when it is already running (without halting) is not possible. The real-time mode on the C28x core is what enables this feature, and it has not been added for the CLA core unfortunately.

    Best Regards,

    Delaney