[SOLVED] STOP / HALT Device when not in Debugging-Mode

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] STOP / HALT Device when not in Debugging-Mode

    Hi,

    Current situation:
    When stopping to debug a application (J-Trace is still connected), the device immediatly starts to run again.

    In many situations this is a problem, because the (maybe buggy) application starts again abd does buggy things (e.g. communicating with hardware, communicating wih other devices, consuming data, changing data-memories, ...).
    This must not occur.
    So i have to PAUSE and not to STOP the debug-session, but this handling is very critical.

    IMHO, stopping a debug-session means stopping the device. If i want to run the device furthermore, i detach the debug-session or disconnect debugger.

    Is there anywhere an option to change this behaviour?

    Environment:
    - J-TRACE-PRO (USB)
    - Linux (XUbuntu)
    - Eclipse
    - OZONE 2.62g

    Thank you.
  • Hello,

    Thank you for your inquiry.
    What exactly do you mean by "stop" the debug session? Do you mean pressing the red "Stop Debug Session" button?
    If yes that in that case the target device connection will be closed by J-Trace PRO and the target restarted.
    If you want to change that default behaviour you can use J-Link exec commend SetRestartOnClose.
    Set this to 0.
    More information can be found in the J-Link user manual UM08001.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Nino,
    coming back to this topic:

    I cant find the comand SetRestartOnClose.
    Is it a comand in the ozone-project-configuration?

    It should (and must) be an option inside J-LINK / J-TRACE, because we often use the debugger inside eclipse. Ozone is just for special problems to have a deeper look inside.


    To keep a device in PAUSE for stopping it is a NO-GO. Unintentioned or intented pressing of STOP (to switch eclipse-perspective to normal-mode back) _MUST_NOT_ lead in restarting the device.

    This day again we had critical situation:
    Cause of a bug (and to detect this we have a debugger) and unintenioned restarting of the device, the device connected to the cloudservice and killed our database (cause of the bug).
    We paused the device while recoding (and playing with eclipse), but it unintentionally started and we had to quick power off the device, but it was to late :(

    IMHO this is a really, really risky default setting for a debugger.
    Please help. Thank you.
  • Hello,

    I need to correct myself on the previous statement. If you Stop/abort the debug session in Ozone will only stop the debug session but the application will simply keep running. You can quickly test this with e.g. an LED that gets enabled at the beginning and disabled after a couple of seconds. If you stop the session after it is you will see that the LED stays off.

    siermm wrote:

    To keep a device in PAUSE for stopping it is a NO-GO. Unintentioned or intented pressing of STOP (to switch eclipse-perspective to normal-mode back) _MUST_NOT_ lead in restarting the device.
    But this is an issue with Eclipse, not with our tools, J-Link ececutes whatever the IDE tells it to do. Our debug software tools only pause if you hit pause. If you hit stop debug session it will stop the debug session and leave the target running or restart (not reset) its execution from pause as we have no control over the target anymore.

    If you want to change this restart behaviour so the target stays paused after stopping the debug session then you can use SetRestartOnClose.
    Sorry for not being more clear before.

    How to use that command string is explained in the J-Link Manual UM08001 in section 7.13 J-Link Command Strings. You can find the PDF in the J-Link install folder under /docs.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.