cancel
Showing results for 
Search instead for 
Did you mean: 

On‑Board ST‑Link Debugger Not Enumerating After Flashing to J‑Link on Nucleo‑F401RE

DEATHWALL
Associate II

 

1. Environment

  • Board: ST Nucleo‑F401RE

  • Host OS: Windows 10/11

  • IDE/Tools:

    • STM32CubeIDE 1.14.0 (Ac6 STM32 Debugging)

    • STM32CubeProgrammer 2.18.0

    • STSW‑LINK009 (ST‑Link USB driver)

    • Segger STLinkReflash_190812 (J‑Link firmware utility)

    • STSW‑LINK007 (Official ST‑Link upgrader)


2. Problem Description

After using STLinkReflash_190812 to load J‑Link firmware onto the on‑board ST‑Link/V2‑1 chip, attempts to restore ST‑Link functionality have failed. Windows Device Manager now only shows the “ST‑Link Virtual COM Port,” and STM32CubeIDE reports:

 

 
Error in final launch sequence: Failed to execute MI command: target remote localhost:61234 Error message from debugger back end: localhost:61234: Connection timed out.

No “STLink Debug in FS Mode” interface appears, so neither STM32CubeProgrammer nor the IDE’s debugger can connect via SWD.


3. Steps Already Tried

  1. Uninstalled J‑Link drivers in Device Manager (SEGGER entries).

  2. Re‑ran STLinkReflash_190812 and selected “Restore ST‑Link.”

  3. Reinstalled STSW‑LINK009 drivers, pointed “Have Disk…” at stsw-link009.inf.

  4. Ran STLinkUpgrade.exe from STSW‑LINK007 to flash official firmware.

  5. Tried different USB cables/ports and “Scan for hardware changes.”

  6. Enabled “Connect under reset” in CubeIDE debug configuration.

  7. Killed conflicting processes on port 61234 before launch.

All of the above steps complete without errors, yet the debugger interface never re‑appears.


4. Expected Behavior

  • Device Manager should list under “Universal Serial Bus devices”:

    1. STMicroelectronics STLink Debug in FS Mode

    2. STMicroelectronics STLink UART in FS Mode

  • STM32CubeProgrammer should connect to the STM32F401RET6 via SWD.

  • CubeIDE debug launch should succeed, attaching to main() over ST‑Link GDB server on port 61234.


5. Actual Behavior

  • Only “ST‑Link Virtual COM Port” appears under “Ports (COM & LPT).”

  • No debug interface (“STLink Debug in FS Mode”) is visible anywhere in Device Manager.

  • STM32CubeProgrammer reports “No ST‑Link detected.”

  • CubeIDE debug times out on target remote localhost:61234.


6. Request for Help

  1. How can I fully restore the on‑board ST‑Link/V2‑1 firmware so that Windows again recognizes the SWD debug interface?

  2. Are there any hidden USB‐VID/PID or driver conflicts that could prevent the ST‑Link from re‑enumerating?

  3. What diagnostic steps can I take (logs, registry entries, firmware dumps) to pinpoint why the debug interface isn’t coming back?

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Super User

The ST-Link reflash is Segger's thing - nothing to do with ST - so you should go to Segger for support on their tool:

https://forum.segger.com/board/4-j-link-flasher-related/ 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

View solution in original post

1 REPLY 1
Andrew Neil
Super User

The ST-Link reflash is Segger's thing - nothing to do with ST - so you should go to Segger for support on their tool:

https://forum.segger.com/board/4-j-link-flasher-related/ 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.