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.

Debug not coming to main

Hi,

I am using XDS510USB emulator in a custom TI board(cortexA8+C674xDSP). After connecting the target via GEL file, I load the .out to the ARM core. The debugger sometimes goes to main() as the starting point. But most of the time, the debug view shows me that the target is running and the control does not hit main().

I tried following up as in described in http://processors.wiki.ti.com/index.php/Troubleshooting_CCS#Debugger, removing the cache file and the metadata folder in workspace. Also I tried creating a new workspace for the project. Spent couple of hours and finally no reults. I could not solve the issue. Please find below the snapshot of the problem.

What is the problem here?

Thanks in advance,

Rama

  • Rama,

    I would suggest disabling the auto run to main while we are figuring out what is going on.

    Go to the Tools -> Debugger Options -> Generic Debugger Options menu

    In the auto run section uncheck the box to autorun "On a program load or restart"

    Then scroll down to the end of the dialog and click the "Remember My Settings button".

     

    I would then try experimenting with different action combinations:

    • Load the program.  Set a breakpoint at main.  Run.
    • Load the program.  Set a breakpoint at main.  Restart.  Run.
    • Load the program.  Set a breakpoint at main.  CPU Reset.  Restart.  Run.

    Do any of those get you to main consistently?

     

    I believe I know which device this is but I don't have access to it. 

     

    Regards,

    John

     

     

     

     

  • Hello John,

    Thanks for reply.

    This setup was working fine quite for somedays without any connection/run issues. Suddenly it started giving troubles. This happened in one more PC also. We try multiple ways and finally after couple of frustrating hours, it starts working!

    Unfortunately, I could not succeed in any of the experiments recommended. I tried swtiching the workspace, changing the USB cable and restarted the CCS4. But in some point of time, the debugger worked. I really could not understand what had happened. When I load the.out for the first time, the debugger says, main is running. Then I halt the program and just reload the .out again without disconnecting/resetting the target. Now, it comes to main(). This behavior is consistent.

    Regards,

    Rama