![](https://img-blog.csdnimg.cn/img_convert/697acf36f05c4784e6d106ccf2ae48e1.png)
DOC文件夹只有程序说明,librarise直接拷贝官方库,listing存放编译后生成的特定文件(很少用),output里面是.hf(仿真器)和.hex(串口),project存放创建的工程,user就是用户自己写的main和驱动程序,keilkill用于写好程序后删除project已达到减小空间的目的
![](https://img-blog.csdnimg.cn/img_convert/ea8ecfe501b174b7405b73f291bcd816.png)
![](https://img-blog.csdnimg.cn/img_convert/394797ee91175e3a60cadbe07aa1bae2.png)
![](https://img-blog.csdnimg.cn/img_convert/dfc0bc4235a88e0e77c828e8db7b7f47.png)
![](https://img-blog.csdnimg.cn/img_convert/c3c810cdfb0ef7306fb7aeffad92e2ea.png)
![](https://img-blog.csdnimg.cn/img_convert/68c76e0ae8a1a474ed41b240dd194496.png)
![](https://img-blog.csdnimg.cn/img_convert/1704162190fc190ed534bb55b7fc533d.png)
准备工作↑
开始创建↓
![](https://img-blog.csdnimg.cn/img_convert/fdba02efbb4d1037e11911877535ff95.png)
![](https://img-blog.csdnimg.cn/img_convert/d915fa4be315162fc16852f8c2359e78.png)
左边目录也是没有硬性要求,但一般分类的更便于他人阅读
![](https://img-blog.csdnimg.cn/img_convert/f8d6e728b61c4f091b659fad6d494584.png)
![](https://img-blog.csdnimg.cn/img_convert/81c4f668921a79a83203ddd296c5b9ae.png)
![](https://img-blog.csdnimg.cn/img_convert/d8f4ea30830d86e447271dde892712c9.png)
下面是给编译器指明编译路径
![](https://img-blog.csdnimg.cn/img_convert/43df1a1a77ef0ff67bfe98c4b691c778.png)
![](https://img-blog.csdnimg.cn/img_convert/37d9af157915ad05cc81fc20f66d148d.png)
![](https://img-blog.csdnimg.cn/img_convert/0cf2ab79f8dc2885916460dfaf3da7cd.png)
![](https://img-blog.csdnimg.cn/img_convert/1b0a1970ca7b1f9e58f4ee571278eaa2.png)
定义这两个宏(记得加点.)
原因如下:
![](https://img-blog.csdnimg.cn/img_convert/dace526a7435e9a34c328e29a523d71a.png)
![](https://img-blog.csdnimg.cn/img_convert/4147e903cbbaeba7ffc80212a7de9b9c.png)
![](https://img-blog.csdnimg.cn/img_convert/409b5e3be230b593effdee14c302f202.png)
![](https://img-blog.csdnimg.cn/img_convert/fafb92518cf1d8f0c8067a897aa00058.png)
分别给hex和listing文件选定生成位置