stm32之新建工程(二)
2017-02-19 本文已影响0人
那段刻骨的岁月
使用官方固件库手动进行工程的创建:
①新建一个工程文件夹,在该文件夹下面建立一下文件夹(可以自己定义)

②将固件库中该路径下的2个文件复制到创建工程的CORE文件夹中

以及路径下的一个启动文件复制到CORE中(根据芯片的型号进行选择)

③将该路径下的inc,src2个文件夹复制到FWLIB中

④将遮个路径下所圈出的文件复制到USER中

⑤打开keil新建工程同样选择单片机以及芯片的型号

⑥点击品字形按钮,建立CORE,USER,FWLIB等分组并将相应目录下的文件.c文件以及启动文件添加进分组

注意启动文件需要点击All files才能看见

⑦点击魔术棒按钮进行相应的配置
需要使用printf函数将该选项勾上

导入相应的.h文件路径以及红色框中的一段话

在Debug中选择st-link并进行相应的配置


最后选择hex文件生成的路径

至此手动创建工程完成!
