现在我可以确定的是硬件电路应该没有问题,我用keil写了个点灯可以正常下载正常在线debug。但是用Truestudio跑STM32CubeMX生成的工程时出现如下报错: STMicroelectronics ST-LINK GDB server. Version 5.1.0 Copyright (c) 2018, STMicroelectronics. All rights reserved. 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 ------------------------------------------------------------------- STM32CubeProgrammer v1.3.0 ------------------------------------------------------------------- Log output file: C:\Users\think\AppData\Local\Temp\STM32CubeProgrammer_a05256.log ST-LINK SN : 50FF6C066686575026510487 ST-LINK FW : V2J37S7 Voltage : 3.23V SWD freq : 4000 KHz Connect mode: Under Reset Reset mode : Hardware reset Device ID : 0x441 Device name : STM32F412 Device type : MCU Device CPU : Cortex-M4 Memory Programming ... Opening and parsing file: C:\Users\think\AppData\Local\Temp\ST-LINK_GDB_server_a05256.srec File : C:\Users\think\AppData\Local\Temp\ST-LINK_GDB_server_a05256.srec Size : 81264 Bytes Address : 0x08000000 Erasing memory corresponding to segment 0: Erasing internal memory sectors [0 4] Download in Progress: File download complete Time elapsed during download operation: 00:00:02.454 Verifying ... Download verified successfully Target is not responding, retrying... Target is not responding, retrying... Target is not responding, retrying... Target is not responding, retrying... Target is not responding, retrying... Target is not responding, retrying... Target is not responding, retrying... Target is not responding, retrying... Target is not responding, retrying... Target is not responding, retrying... Error! Failed to read target status Debugger connection lost. Shutting down... |
芯片是STM32F412RET6 |
log 上看到下载成功了,会不会是下载的代码内容对调试有影响呢?可是试试其他程序先。 |