使用HAL库编写串口发送程序时发现程序正常编译,无法烧录,报错
Error in final launch sequence:
Failed to execute MI command:
target remote localhost:61234
控制台报错
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
解决办法:
配置工程中sys->Debug 设为 Serial Wire然后重新生成即可,如果还不行可以尝试重置
重置步骤:单片机通电后将boot0跳线接到1,按下重置按钮,烧录一次程序,再将boot0跳线接回0,按下重置按钮,程序就可以正常运行了