[SOLVED] J-Link GDB Server connect-to-target problem

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

  • [SOLVED] J-Link GDB Server connect-to-target problem

    Hello Forum,

    I wonder if I have some timing problem when invoking the J-Link GDB Server?
    (I'm running GDB version 5.02f, J-Link version 0.4 and emIDE version 2.20)

    Observations:
    1. When starting debug within emIDE it fails with the message:
    "tcp:localhost:2331: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond".

    2. When starting the GDB server manually it fails to connect to target and exits.

    3. If first starting the J-Link Commander and then the GDB server, the GDB server connects to the target and stays up, waiting for connection.

    4. Then the emIDE debug session can start.

    I have checked all emIDE settings and Segger J-Link registry settings and can't find any wrong.

    Please advice.
    Best regards
    Terje Froysa
  • Hi Terje,


    Which target device are you using?
    What do you mean with "J-Link version 0.4"?
    Could you start J-Link Commander (jlink.exe) and provide us the output?

    Best regards,
    Niklas
    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 Niklas

    I am running a Nordic nRF52 evaluation board with a Cortex M4.
    Sorry for the 0.4 which refers to the J-link plug-in dll version of the emIDE.

    In the attachment you will find the screen-shots related to my problem.
    It seems to me that the GDB Server is started when I start the emIDE, but I think it fails and exits.
    Because, if I try to start the GDB Server manually, it fails to connect to target and exits after 2-3 seconds.
    Only if I start jlink.exe first, the GDB Server comes up and stays.

    Best regards
    Terje
    Files
    • Debug.pdf

      (647.89 kB, downloaded 2,767 times, last: )
  • Hi Terje,

    Sorry for the 0.4 which refers to the J-link plug-in dll version of the emIDE.

    Thanks for the clarification.
    If you can provide us with the emIDE Project settings (or even better, the project itself), I will try to reproduce this problem on our side.


    Best regards,
    Niklas
    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 Niklas,

    You are welcome to try.
    When establishing this project, I made a directory "MyProjects" on the same level as the downloaded nRF52_SDK from Nordic.

    I made my own HRS project (Hart Rate Simulator) by referring the SDK example files with relative paths.
    By reading the corresponding gcc makefile, I established the same settings in the emIDE environment.
    Hence, to compile this project you have to download the nRF52_SDK files (which are too big to attach here) side-by-side to the "MyProjects" directory.

    Best regards
    Terje
    Files
    • MyProjects.zip

      (493.65 kB, downloaded 965 times, last: )
  • Hi Terje,

    sorry for the delay in response.

    Two little thinks I noticed about your project file:
    (In "Project options", tab "Debugger", for both release and debug configuration: )
    • In sub-tab "GDB" change the field "Remote Server" from other(external tool) to J-Link GDB Server
    • In sub tab "J-Link GDB Server" change "Target Interface" from JTAG to SWD
    With this changes I was able to start a debugging session with a Nordic nRF52 evaluation board using your project.
    All Nordic nRF52 evaluation boards I am aware of do not support JTAG but only SWD.

    Best regards,
    Niklas

    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.