[SOLVED] Atollic/Eclipse J-Link cannot open listener port

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

  • [SOLVED] Atollic/Eclipse J-Link cannot open listener port

    Hello,
    This morning my J-Link Plus suddenly was not able to connect to my target MCU. Seems like the error is related to the inability of opening the listener port. I tried to debug my application in both Atollic and Eclipse(GNU MCU).

    Source Code

    1. SEGGER J-Link GDB Server V6.42b Command Line Version
    2. JLinkARM.dll V6.42b (DLL compiled Feb 5 2019 17:31:40)
    3. Command line: -port 2331 -s -CPU Cortex-M -device STM32L496VG -endian little -speed 4000 -vd
    4. -----GDB Server start settings-----
    5. GDBInit file: none
    6. GDB Server Listening port: 2331
    7. SWO raw output listening port: 2332
    8. Terminal I/O port: 2333
    9. Accept remote connection: localhost only
    10. Generate logfile: off
    11. Verify download: on
    12. Init regs on start: off
    13. Silent mode: off
    14. Single run mode: on
    15. Target connection timeout: 0 ms
    16. ------J-Link related settings------
    17. J-Link Host interface: USB
    18. J-Link script: none
    19. J-Link settings file: none
    20. ------Target related settings------
    21. Target device: STM32L496VG
    22. Target interface: JTAG
    23. Target interface speed: 4000kHz
    24. Target endian: little
    25. Connecting to J-Link...
    26. J-Link is connected.
    27. Firmware: J-Link V10 compiled Jul 23 2019 13:46:10
    28. Hardware: V10.10
    29. S/N: 600106282
    30. Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    31. Checking target voltage...
    32. Target voltage: 3.33 V
    33. ERROR: Failed to listen at socket (Err = -1)
    34. ERROR: Failed to open listener port 2331
    35. Restoring target state and closing J-Link connection...
    36. Shutting down...
    37. Failed to open listener port 2331
    Display All

    However, if I were to connect to using the application "J-Flash vx.xxx", the J-Link was able to established a connection:

    Source Code

    1. Application log started
    2. - J-Flash V6.42b (J-Flash compiled Feb 5 2019 17:32:19)
    3. - JLinkARM.dll V6.42b (DLL compiled Feb 5 2019 17:31:40)
    4. Opening project file [D:\JFlash Project Files\STM32L496VE.jflash] ...
    5. - Project opened successfully
    6. Failed to open data file [C:\Users\whuang\Downloads\Firmware-20190628.246\RoamBase-1.1.5.246\RoamBase_1.1.5.246_Bank0.hex]...
    7. Connecting ...
    8. - Connecting via USB to J-Link device 0
    9. - J-Link firmware: J-Link V10 compiled Jul 23 2019 13:46:10
    10. - Device "STM32L496VE" selected.
    11. - Target interface speed: 4000 kHz (Fixed)
    12. - VTarget = 3.328V
    13. - TotalIRLen = 9, IRPrint = 0x0011
    14. - JTAG chain detection found 2 devices:
    15. - #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP
    16. - #1 Id: 0x06461041, IRLen: 05, Unknown device
    17. - STM32 (Protection Detection): Unexpected IDCODE DEV_ID 0x 461 found. Only checking the 1st flash bank for write protection.
    18. - TotalIRLen = 9, IRPrint = 0x0011
    19. - JTAG chain detection found 2 devices:
    20. - #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP
    21. - #1 Id: 0x06461041, IRLen: 05, Unknown device
    22. - Scanning AP map to find all available APs
    23. - AP[1]: Stopped AP scan as end of AP map has been reached
    24. - AP[0]: AHB-AP (IDR: 0x24770011)
    25. - Iterating through AP map to find AHB-AP to use
    26. - AP[0]: Core found
    27. - AP[0]: AHB-AP ROM base: 0xE00FF000
    28. - CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    29. - Found Cortex-M4 r0p1, Little endian.
    30. - FPUnit: 6 code (BP) slots and 2 literal slots
    31. - CoreSight components:
    32. - ROMTbl[0] @ E00FF000
    33. - ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    34. - ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    35. - ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    36. - ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    37. - ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    38. - ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    39. - Executing init sequence ...
    40. - Initialized successfully
    41. - Target interface speed: 4000 kHz (Fixed)
    42. - J-Link found 2 JTAG devices. Core ID: 0x4BA00477 (None)
    43. - Connected successfully
    Display All
    Tried resetting my PC multiple times but to no avail. Any idea what is going on and how I can go about fixing it? It was working perfectly fine until now.

    Thanks
  • Hello,

    Thank you for your inquiry.
    We received your inquiry via our support system as well.
    To make sure no data gets lost this thread will be closed now.

    Information for others who end up here:
    The issue seems to have been related to the host PC. It got resolved as follows: Resolved by entering netsh http add iplisten 0.0.0.0

    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.