[SOLVED] Halt on Connect

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

  • [SOLVED] Halt on Connect

    How can I get debugger to halt on connect?
    I have a code hang and want to check where it's spinning?

    Segger Embedded Studio for ARM V5.68

    Thanks,


    More to my issue; code/system behaves fine when debugger is connected; but seems to hang up if debugger not connected. In such a hang; connecting the debugger seems to let the processor run again from where the hang was.

    I am suspecting a RTT related issue; I am using three sets of RTT buffers; all of which should be skip/no block. But I am suspecting the connect of the debugger is flushing the buffers and therefore letting the target proceed. I am sure there used to be an option to let one halt on connect or am I thinking of IAR.

    I can connect using Jlink commander and halt; but then I don't have the facility of a nice stack backtrace.

    The post was edited 1 time, last by owain-incus ().

  • Hi,
    Thank you for your inquiry.

    There is no such option in Embedded Studio (ES).
    You can however use Ozone, which offers attach & halt.

    If this is actually related to RTT, I would suggest to recheck your buffer configuration.
    You can also disable RTT handling in ES and close all applications using RTT.
    In such a case, RTT would not be activated on attach, and your application would still hang in the print routine,
    as the buffers are not emptied.

    Please note:
    Some targets have a reset as part of the device specific connect.
    This reset is currently also executed when attaching to the device.
    In such a case, the reset might also be the reason for the application to stop hanging.

    Best regards,
    Fabian
    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.