Skip to main content
Visitor II
August 18, 2025
Solved

ST-LINK connection issue with VSCode

  • August 18, 2025
  • 5 replies
  • 1036 views

编译正常,也能识别到stlink,但是没办法运行调试烧录,也没办法升级stlink固件 ,一烧录就显示以下报错,目前没找到解决办法,但网上已有与我相同问题的用户

Translationn:

The compilation is normal and stlink can be recognized, but I can't run the debug burn, nor can I upgrade the stlink firmware. The following error is displayed when burning. I haven't found a solution yet, but there are users with the same problem as me on the Internet

屏幕截图 2025-08-18 205514.png

屏幕截图 2025-08-18 184451.png

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    If this is your own board and you want to build your own ST-LINK/V2 with an STM32F103, it CAN'T work with the software from STMicroelectronics. The ST-LINK firmware is subject to copyright, not released or available for self-built ST-LINKs, copies of this firmware are illegal and are understandably not supported.

    STLINK-V3MODS are available for just such applications, which you can solder onto your own board. At least then you are not using illegally copied software.

    Regards
    /Peter

    5 replies

    Technical Moderator
    August 18, 2025

    Welcome @jiangkoumo, to the (English speaking) community!

    What type of ST-LINK are you using?

    Could you please include a photo of it, and if it is in a plastic case, please include a photo of the back as well?

    Regards
    /Peter

    Visitor II
    August 19, 2025

    是自己设计的板子上板载的stlink,用的f103cbt6芯片做的,使用的stlink-v2的固件

    微信图片_20250819210940_140.jpg

    Technical Moderator
    August 19, 2025

    Hi @jiangkoumo 

    your ST-link FW may be not updated, please proceed to update and check again (hover on the connected board to get the update button)

    您的 ST-link FW 可能未更新,请继续更新并再次检查(将鼠标悬停在连接的板上以获取更新按钮)

    NawresGHARBI_0-1755593011721.png

     

    Visitor II
    August 19, 2025

    升级会提示失败,下面图片是报错信息

    屏幕截图 2025-08-19 211832.png

    Visitor II
    August 19, 2025

    调试控制台的输出信息如下:

    STMicroelectronics ST-LINK GDB server. Version 7.10.0
    Copyright (c) 2025, STMicroelectronics. All rights reserved.

    Starting server with the following options:
    Persistent Mode : Disabled
    Logging Level : 8
    Listen Port Number : 61234
    Status Refresh Delay : 15s
    Verbose Mode : Disabled
    SWD Debug : Enabled
    InitWhile : Enabled
    Device connect error

    Error in initializing ST-LINK device.
    Reason: Failed to connect to device. Please check power and cabling to target.
    cube has exited with code 1GNU gdb (GNU Tools for STM32 13.3.rel1.20250523-0900) 14.2.90.20240526-git
    Copyright (C) 2023 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "--host=x86_64-w64-mingw32 --target=arm-none-eabi".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <https://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word".
    add-symbol-file "C:/Users/jiangkoumo/Desktop/1_led_twinkle/build/Debug/STM32H7xx.elf"
    add symbol table from file "C:/Users/jiangkoumo/Desktop/1_led_twinkle/build/Debug/STM32H7xx.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from C:/Users/jiangkoumo/Desktop/1_led_twinkle/build/Debug/STM32H7xx.elf...

    Technical Moderator
    August 19, 2025

    seems your board is not connected or well powered please check from this side 

    If it is already the case sometime the ST-link FW needs a power cycle to work so I invite you to unplug and re-plug your board

     

    似乎您的板子未连接或电源不足,请从这一侧检查。 如果已经是这种情况,有时ST-link固件需要重启才能工作,所以我建议您拔掉并重新插入您的板子。

    Technical Moderator
    August 19, 2025

    If this is your own board and you want to build your own ST-LINK/V2 with an STM32F103, it CAN'T work with the software from STMicroelectronics. The ST-LINK firmware is subject to copyright, not released or available for self-built ST-LINKs, copies of this firmware are illegal and are understandably not supported.

    STLINK-V3MODS are available for just such applications, which you can solder onto your own board. At least then you are not using illegally copied software.

    Regards
    /Peter