Two GDB Jlink Server on 1 PC

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

  • Two GDB Jlink Server on 1 PC

    Hi there,

    I've read few old posts about this problem. I want to start two GDB SWD Debugsessions in my VMWare virtual machine. At the moment, I get an error message (cannot open port) if I start a second instance of the GDB server and connect to my 2. jlink adapter.

    I tested it the opportunity to use one GDB server in my normal Win7 and the second in my VM. This works, but I dont want to copy every change made in Eclipse on my normal Windows into my VM.
  • Hi,

    The problem is that not multiple processes can open the same port for listening.
    So when using a second instance of GDBServer on the same PC, it needs to listen on another port.
    This can be achieved by starting J-Link GDB Server as follows (example):

    Source Code

    1. ./JLinkGDBServer -port 2400


    I used 2400 here to make sure to not get in conflict with any other ports may be used by the first instance (2332 for RAW SWO, 2333 for semihosting/printf SWO)


    Best regards
    Alex
    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.
  • In last version new port added: Terminal I/O port. It defaults to 2333 and there are no command line option to change it. Please, advise on.
    P.S. Strange, but I was able to run two instances with no errors. Moreover, both successfully connected to same J-Link instance !