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.

Auto-run on program load also means auto-stop on debugger stop (CCS 5.2.1)

Other Parts Discussed in Thread: TM4C1294NCPDT

In debug configuration options, tab "target" auto-run option "on a program load or restart" also makes the program stop when you hit the stop button in the debugger.

With that option turned off, the program continues to run when I hit the stop button.

An hidden and unrelated feature from my point of view, unless I am the only one experiencing that...

  • Hi Fred,

    I'm a little fuzzy on some details:

    Fred P said:
    In debug configuration options, tab "target" auto-run option "on a program load or restart" also makes the program stop when you hit the stop button in the debugger.

    In your environment, do you have the label that is defined in the auto-run option in your application? In any case I would expect the program to halt when the pause button is pressed so this is expected.

    Fred P said:
    With that option turned off, the program continues to run when I hit the stop button.

    So when auto-run is disabled, you are saying that after you load the program, you would be at the entry point of your application and then when you run the target (via run command), it will but halt with the pause button.

    Please confirm the above and also provide details on your target and emulator.

    Thanks

    ki

  • Definitly, when I hit "pause", it pauses, when I hit "play", it runs and when I hit "stop", it stops.  Not matter the settings, this holds true.

    Ki-Soo Lee said:
    So when auto-run is disabled, you are saying that after you load the program, you would be at the entry point of your application and then when you run the target (via run command), it will but halt with the pause button.

    Pause button works as it should.

    "stop" button, when in auto-run, halts the target; debugger disconnects and no more code is executed.  However, "stop" does NOT halt the target when auto-run is disabled; the debugger just disconnects and lets the target run.  Note that in either case, the target was running (that is, not halted on a breakpoint or by "pause" button) before I hit the "stop" button.

    I don't understand your question: " In your environment, do you have the label that is defined in the auto-run option in your application?"

    I am talking about item shown below:

  • Fred,

    Thanks for the details. I assume when you mentioned "stop", you mean "terminate" (the red square). Basically shutting down the debugger.

    I see that you have 'main' defined as the label in your auto-run options. Do you have a main in your application?

    And what target and emulator are you using?

    Thanks

    ki

  • Indeed, stop means terminate.

    We do have a main and it works as it should.

    Target is F28335

    Emulator is XDS100v2

  • I have a similar question. When I stop (terminate) the debugger after hitting a breakpoint or after pressing the suspend button, code running from RAM continues to execute. Is there a setting that will hold the F28335 in reset or suspend after terminating the debug session? What would the effect be if the debug session were to be terminated while the code is running?

    Thanks,

    Ryan

  • I experience the same behaviour described in this thread's title with CCS v6.0.1.

    Can I change the behaviour so that the program keeps running once the debugging session stops ?  The reason I ask is that when I was using CCS v5.4 the program would NOT stop when I stopped the debugger.  It's as though the debugger simply disconnects under v5.4.

    Here is a screen shot of the relevant settings in each CCS version. they are identical but the behaviour differs !

  • Peter - What emulator and device are you using? I know for v6, the debugger remains halted after disconnect when using XDS100 + C2000

    ki
  • Ki-Soo Lee said:
    Peter - What emulator and device are you using

    Hi Ki,

    I am using the TM4C1294NCPDT device.  

    I didn't know I was using an emulator, but in the Help\About\Installed Software\ menu it is listed as

    Name:TI Emulators
    Version:5.1.507.2

    My colleague is also using the TM4C1294NCPDT but with different code.  He has the same IDE (CCS v6.0.1) and compiler but his code remains running after he stops the debugger.

    regards

    Peter

  • Peter John said:
    He has the same IDE (CCS v6.0.1) and compiler

    Oops I meant to write he has a different compiler v5.1.9 whereas I am using v5.1.6

    regards

    Peter

  • Peter John said:
    I didn't know I was using an emulator

    What is the connection type? You can find this in your target configuration file.

    ki

  • Ki-Soo Lee said:
    What is the connection type? You can find this in your target configuration file.

    Stellaris In-circuit Debug Interface.

    regards

    Peter

  • Hi Ki,

    Any thoughts ? You can probably reproduce the behaviour on the Tiva TMC1294 launchpad as it uses the same family of MCU and interface I have setup.

    regards
    Peter.
  • I was unable to reproduce the behavior. I used CCSv6.0.1, Tiva TMC1294 LaunchPad, and the on-board Stellaris In-Circuit Debug Interface.Target will always resume execution when the debugger is terminated (regardless of the target state at the time).

    One difference I do have is that I am using a newer TI Emulator pack than you 5.1.635.0. You can try updating your version and see if that helps.

    ki

  • Ki-Soo Lee said:
    One difference I do have is that I am using a newer TI Emulator pack than you 5.1.635.0. You can try updating your version and see if that helps.

    hi Ki, I will try that only if the downgrade option works.  My colleague and I need to have strictly controlled development environments and I can't keep upgrading unless it is necessary as he recently attempted to downgrade after accidentally permitting an auto upgrade to the compiler, but the compiler downgrade failed (I can get error msg tomorrow).  If I permit the upgrade without depending on the downgrade working I need to know if I can download the entire CCS v6.0.1 installation PLUS all upgrades to date in one standalone package that we can archive on our servers because if anybody needs to rebuild the code at some future date then they will need to install EXACTLY the same IDE used at the time the code was frozen (e.g. right now).

  • I stumbled across the reason my target stops after I stop a debug session.  I have a printf statement regularly being called which outputs to the CCS console.  If I comment this printf statement out then my target continues running after I stop the debug session !  This is different behaviour for the same code under CCS v5.4

    If I leave the printf statement in place I can manually reset the target (with a push button toggling the MCU's reset pin) if necessary, but that is not a desirable approach.

    I will start another thread relating to downloading the latest version of any software module/component of CCS

    regards

    Peter

  • Peter John said:

    I stumbled across the reason my target stops after I stop a debug session.  I have a printf statement regularly being called which outputs to the CCS console.  If I comment this printf statement out then my target continues running after I stop the debug session !  This is different behaviour for the same code under CCS v5.4

    If I leave the printf statement in place I can manually reset the target (with a push button toggling the MCU's reset pin) if necessary, but that is not a desirable approach.


    Are you using the same compiler version in v6 that you used with v5.4? If not, can you try using it (or load the executable generated from 5.4 into v6)? I just want to rule out the odd chance that it has anything to so with the generated code.


    Thanks

    ki

  • Ki-Soo Lee said:
    Are you using the same compiler version in v6 that you used with v5.4? If not, can you try using it (or load the executable generated from 5.4 into v6)? I just want to rule out the odd chance that it has anything to so with the generated code.

    I wasn't so I added my prior compiler (v5.0.4) into the CCS v6 system preferences which only had v5.6.  (refer here for the process of pointing to another compiler)

    I then ensured the project's properties had v5.0.4, I rebuilt and ran but it made no difference to this behaviour.  Only commenting out the printf statement succeeded in permitting the target to continue running after stopping a debug session.

    regards

    Peter