[SOLVED] Connecting to J-Link failed. Connected correctly?

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

  • [SOLVED] Connecting to J-Link failed. Connected correctly?

    Hello,
    I have the problem, that I'm currently not able to debug, using the JLinkGDBServer under OS/X. I start the server with:

    Source Code

    1. JLinkGDBServer -select USB -device nRF51422_xxAA -if SWD -speed 100


    and get the following error message:

    Source Code

    1. SEGGER J-Link GDB Server V4.92 Command Line Version
    2. JLinkARM.dll V4.92 (DLL compiled Sep 30 2014 09:55:19)
    3. -----GDB Server start settings-----
    4. GDBInit file: none
    5. GDB Server Listening port: 2331
    6. SWO raw output listening port: 2332
    7. Terminal I/O port: 2333
    8. Accept remote connection: yes
    9. Generate logfile: off
    10. Verify download: off
    11. Init regs on start: on
    12. Silent mode: off
    13. Single run mode: off
    14. Target connection timeout: 5 sec.
    15. ------J-Link related settings------
    16. J-Link Host interface: USB
    17. J-Link script: none
    18. J-Link settings file: none
    19. ------Target related settings------
    20. Target device: nRF51422_xxAA
    21. Target interface: SWD
    22. Target interface speed: 100kHz
    23. Target endian: little
    24. Connecting to J-Link...
    25. Connecting to J-Link failed. Connected correctly?
    26. GDBServer will be closed...
    27. Shutting down...
    Display All


    If I start the GDBServer without any parameters, I get the following error message:

    Source Code

    1. -----GDB Server start settings-----
    2. GDBInit file: none
    3. GDB Server Listening port: 2331
    4. SWO raw output listening port: 2332
    5. Terminal I/O port: 2333
    6. Accept remote connection: yes
    7. Generate logfile: off
    8. Verify download: off
    9. Init regs on start: on
    10. Silent mode: off
    11. Single run mode: off
    12. Target connection timeout: 5 sec.
    13. ------J-Link related settings------
    14. J-Link Host interface: USB
    15. J-Link script: none
    16. J-Link settings file: none
    17. ------Target related settings------
    18. Target device: unspecified
    19. Target interface: JTAG
    20. Target interface speed: 1000kHz
    21. Target endian: little
    22. Connecting to J-Link...
    23. J-Link is connected.
    24. Firmware: J-Link Pro V4 compiled Sep 29 2014 19:52:50
    25. Hardware: V4.00
    26. S/N: 174200426
    27. Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    28. Checking target voltage...
    29. Target voltage: 3.29 V
    30. Listening on TCP/IP port 2331
    31. Connecting to target...ERROR: Could not connect to target.
    32. Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
    33. Shutting down...
    Display All


    On the other hand, I'm able to connect to the target, flash the target and (for example) read memory from target, using JLinkExe:

    Source Code

    1. > JLinkExe -device nRF51422_xxAA
    2. SEGGER J-Link Commander V4.92 ('?' for help)
    3. Compiled Sep 30 2014 09:55:25
    4. Info: Device "NRF51422_XXAA" selected (257 KB flash, 16 KB RAM).
    5. DLL version V4.92, compiled Sep 30 2014 09:55:19
    6. Firmware: J-Link Pro V4 compiled Sep 29 2014 19:52:50
    7. Hardware: V4.00
    8. S/N: 174200426
    9. Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    10. IP-Addr.: No configuration received via DHCP
    11. VTarget = 3.288V
    12. Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
    13. Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
    14. No devices found on JTAG chain. Trying to find device on SWD.
    15. Info: Found SWD-DP with ID 0x0BB11477
    16. Info: Found Cortex-M0 r0p0, Little endian.
    17. Info: FPUnit: 4 code (BP) slots and 0 literal slots
    18. Cortex-M0 identified.
    19. Target interface speed: 100 kHz
    20. J-Link>mem32 c000,2
    21. 0000C000 = 20004000 0000C475
    Display All


    What am I'm doing wrong here?

    kind regards,

    Torsten Robitzki
  • We've tried to debug on three different MacBooks, using three different jLink Pros and a couple of targets, we encountered, that the problem only occurs on my Laptop where JLinkGDBServer V4.92 was installed. Fortunately, a colleague kept the install binaries for V4.90. Installing V4.90 solved the problem. May I suggest that segger provides not just the latest versions of the software, but also some of the former versions?

    Cheers,

    Torsten
  • Hi Throsten,

    As far as I know, there have not been any changes regarding the J-Link low-level connection (that seems to fail here)
    between V4.90 and V4.92. We will check if we can reproduce.
    Can you please provide some additional information about your setup?
    What version of OS X are you using?

    May I suggest that segger provides not just the latest versions of the software, but also some of the former versions?

    Maybe you should have a look on the website first?
    segger.com/j-link-older-versions.html


    - 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.
  • Hi Torsten,

    There seems to be a problem with the -select command line option without specifying a serial number.
    If you have only one J-Link connected to your Mac, you can simply remove the "-select USB".
    If you have more than one J-Link connected, you will have to specify the serial number of the J-Link with "-select USB=174200426".

    Does starting GDB Server with "JLinkGDBServer -device nRF51422_xxAA -if SWD -speed 100" work?

    We will fix the problem to be able to connect to J-Link, even if no serial number is specified.

    Best regards
    Johannes
    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.