# 安装Keil开发环境 pibot docs/software/MDK520目录提供了Keil5的安装包`MDK520.EXE`,安装过程不再赘述 > 完成安装后需要继续安装Keil.STM32F1xx_DFP.2.2.0.pack # 编译与烧写 ## 编译 到`PIBOT`源码包中双击打开`pibot.uvprojx`工程,编译 ![](https://upload-images.jianshu.io/upload_images/3678585-b70d1e2dfbb71dfa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ## 烧写程序 > **这里我们使用`JLink`烧写程序,连接`JLink`至开发板,开发板上电这里的JLink只需要连接GND SWDIO SWCLK三根线** 打开工程选项,切换至Debug标签,选择`JLink` ![](https://upload-images.jianshu.io/upload_images/3678585-f4faa6fb614f85e3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 点击`Settings`按钮,`Port`选择`SW` ![](https://upload-images.jianshu.io/upload_images/3678585-d00e943421112f2d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 切换至Flash Download标签,如下图设置 ![](https://upload-images.jianshu.io/upload_images/3678585-ffda6263dd4478be.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 保存后即可烧写程序 ![](https://upload-images.jianshu.io/upload_images/3678585-6e35f6af95e93451.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 同时可以看到程序运行指示灯在闪烁表示程序在正常运行了