使用 STM32 ST-LINK Utility ,一切正常,我可以烧录 hex 文件,固件也能运行。
但如果我通过 STM32CubeIDE进入调试,总是出现这个错误:以下是控制台文本。
Error in final launch sequence:
Error in initializing ST-LINK device.
Reason: (1) Failed to connect to device. Please check power and cabling to target.
Error in initializing ST-LINK device.
Reason: (1) Failed to connect to device. Please check power and cabling to target.
STMicroelectronics ST-LINK GDB server. Version 5.3.2
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
Waiting for debugger connection...
Debugger connected
Failed #5
-------------------------------------------------------------------
STM32CubeProgrammer v2.2.0
-------------------------------------------------------------------
Log output file: C:\Users\LAB2-R~1\AppData\Local\Temp\STM32CubeProgrammer_a05448.log
ST-LINK SN : 55FF6C067282575133492167
ST-LINK FW : V2J34S7
Voltage : 3.19V
Error: ST-LINK error (DEV_TARGET_RESET_ERR)
Encountered Error when opening C:\ST\STM32CubeIDE_1.0.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.1.0.201910081157\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...
我试了几个编程器和几个相同的mcu,结果都一样——IDE 总是报这个错误。
|
|