[SOLVED] -timeout parameter to JLinkGDBServer seems not working

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

  • [SOLVED] -timeout parameter to JLinkGDBServer seems not working

    Hi,

    I've tried specifying a timeout on connection to GDBServer, but it seems to be ignoring it, always exists with after 1-3 secs no matter what timeout I'm giving it:

    /opt/SEGGER/JLink/JLinkGDBServer -device VF6xx_M4 -IF JTAG -select ip=10.69.4.251 -timeout 20000

    Am I using it wrong?
  • Hello Denis,

    Thank you for your inquiry.
    It looks all right how you use it.
    In what order are you launching the GDB server? According to the J-Link User Manual it says:
    The recommended order is to power the target, connect it to J-Link and then start
    GDB Server.


    Are you following this suggestion?

    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.
  • Hello Nino,

    Shouldn't the timeout parameter still work independent of what you quoted? Is it not the connection timeout one is setting?

    Note that I'm using the IP interface. For testing, I'm connecting to a (very) remote Segger J-Link Pro, and I do need to adjust the default timeout, as it seems GDBServer exists way too fast.
  • Hello Denis,

    Note that I'm using the IP interface. For testing, I'm connecting to a (very) remote Segger J-Link Pro, and I do need to adjust the default timeout, as it seems GDBServer exists way too fast.


    This setup will not work the way you use it. The IP address you are using to connect is probably not reachable by your computer. You can simply try to ping 10.69.4.251 with the windows cmd.exe
    and you will get the same timeout error.

    For such a setup that you want to run you need to use the J-Link Remote Server: segger.com/products/debug-prob…ols/j-link-remote-server/

    More information can be found in the J-Link user manual.

    Shouldn't the timeout parameter still work independent of what you quoted? Is it not the connection timeout one is setting?


    The -timeout parameter is only setting a timeout for the J-Link to target device (MCU) connection. Not your host PC to J-Link connection.
    This is also described in the user manual.

    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,

    Thanks for replying, so seems I have it confused on how to connect to the network'ed Segger's J-Link Pro (with Eth connection).

    So that unit is on network, and is connected and serves. I can ping that IP fine (as I'm connected through VPN), and I can access the Segger J-Link Pro web interface on port 80 just fine. I can see network status, and power on,off the unit
    through the web control.

    I also can access the Pro's unit port 19020, which, to be, is the remote server inside it. When I telnet into this, I get the trace
    J-Link Pro V4 compiled 15:44:26 on Jul 10 2017


    So, am I wrong then at thinking that SeggerGDBServer should be able to connect to this network'ed J-Link Pro unit, through port 19020?

    I have tried the experiment with my local USB Segger J-Link , and the command line JLinkRemoteServer application. That application, when it starts, opens same port 19020 , and 19021 (Segger's RTT).
    I have tested that Segger GDBServer then, with -select IP=127.0.0.1 connects just fine to this locally running JLinkRemoteServer.

    But why I cannot connect to the Segger J-Link Pro which has the network interface, and seems running and accessible? Isn't the point of the unit to have the Ethernet port precisely for this, so you can do remote debugging directly through it?

    Please clarify this.
  • Hello Denis,

    If you are using vpn to connect to the network of the J-Link and you can ping it inside the network you wont need to use the remote server.
    You should be able to connected to the J-Link over IP like you did before.
    Make sure that the J-Link is reachable from your computer and that you are in the same subnet.
    You can easily find out by running our JLinkConfig application. There you will get a list of all J-Links reachable by your computer over USB or IP.
    Make sure you allow that application in your firewall otherwise the devices wont show.

    Keep in mind that with far away connections you are adding higher latency to your debug connection so features like RTT are only usable in a very very limited way if it works at all.

    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

    SEGGER - Nino wrote:

    ....
    Make sure that the J-Link is reachable from your computer and that you are in the same subnet.
    ....

    SEGGER - Nino wrote:

    You can easily find out by running our JLinkConfig application
    Please see also my thread here:
    Fail to connect to Segger J-Link Pro with Ethernet connection, using TCP/IP


    Segger JLink , GDBServer still refuse to work, even though I can access the J-Link over network by test tools.

    Does JLinkExe, JLinkGDBServer need any other ports and protocols besides TCP 19020?

    Is JLinkConfig part of the standard JLink installation? I cannot find this program in my Linux Segger installation.
  • Hello Denis,

    Your first question has been answered in the other thread.

    Is JLinkConfig part of the standard JLink installation? I cannot find this program in my Linux Segger installation.


    The JLinkConfig is only part of the Windows software package.

    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.