2019-06-04 转自本人博客园
https://www.cnblogs.com/YuQiao0303/p/9994426.html
详细资料:
http://www.openedv.com/thread-13912-1-1.html
需要安装的软件:
1.keil(MDK,必选),用keygen破解
2.CH340驱动,(usb串口驱动,用来下载程序。方便但下载速度较慢,无法调试)
3.STLINK驱动(用来下载程序,下载速度快且可以调试;不占用串口,可以用串口调试助手查看调试信息)
4.XCOM V2.0.exe (串口调试助手,可以查看串口的输出信息)
程序下载(两种方法)
1. CH340驱动(
usb接口接电脑
![15426916-f138306ee8dff305.png](https://upload-images.jianshu.io/upload_images/15426916-f138306ee8dff305.png)
image
用下图软件下载
![15426916-d10e6e0bdbdfa768.png](https://upload-images.jianshu.io/upload_images/15426916-d10e6e0bdbdfa768.png)
image
2. STLINK驱动
教程里大谈JLINK,其实下载的板子配套的改成stlink了,有个文档是补充说明
![15426916-8702b3aff9da5393.png](https://upload-images.jianshu.io/upload_images/15426916-8702b3aff9da5393.png)
image
安装STLINK驱动
安好驱动后用usb线把STLink连接到电脑,对“这台电脑”右键,管理,设备管理器,可以看到下图情况(win10)
![15426916-3438a7c6f53abdd0.png](https://upload-images.jianshu.io/upload_images/15426916-3438a7c6f53abdd0.png)
image
STLINK的配置
打开一个keil的stm32工程,操作如下:
![15426916-85a81f14cd3eaed6.png](https://upload-images.jianshu.io/upload_images/15426916-85a81f14cd3eaed6.png)
image
![15426916-6a3475b963865a2d.png](https://upload-images.jianshu.io/upload_images/15426916-6a3475b963865a2d.png)
image
![15426916-94a1ed76bb71fe23.png](https://upload-images.jianshu.io/upload_images/15426916-94a1ed76bb71fe23.png)
image
![15426916-81246b39f56c8a28.png](https://upload-images.jianshu.io/upload_images/15426916-81246b39f56c8a28.png)
image
之后都是ok,确定之类
STLink下载程序
![15426916-1e8a8d181adbc191.png](https://upload-images.jianshu.io/upload_images/15426916-1e8a8d181adbc191.png)
image
编译好后点这个load就ok了
![15426916-641f0c258e37f244.png](https://upload-images.jianshu.io/upload_images/15426916-641f0c258e37f244.png)
image
转载于:https://www.jianshu.com/p/a3f5e7c5e847