二、IAR创建工程并进行烧写
2.1创建IAR工程
2.2烧写
2.1.安装完成后创建IAR工程
1.首先创建一个新的文档用于存放工程
2.创建你要进行开发方向代码的存放文档,例如GPIO
3.创建一个Core_Function用于存放.c和.h文件
再将红圈内俩个文档复制进去
文档可进我百度云提取
链接:https://pan.baidu.com/s/1N2JuLOszQ8QzJrEGw4hKbA
提取码:jtms
4、点击Project
5、点击Project点击STM8S_StdPeriph_Template
6、点击EWSTM8
7、点击Project.eww打开IAR
8、进入IAR,创建.c和.h文件
9、ctrl+s保存进Core_Function中的GPIO文档中
文件分别命名为GPIO.C,GPIO.H
10、点击Project-STM8S103的ADD来将Core_Function添加进来
可以看见已经被添加进来了,下面点击Options
11、点击红框内的【...】进行路径的添加
12、点击Click to add
13、添加完成后,再右键Core_Function的Add Files文件添加GPIO.H
然后在main函数里调用我们需要的方法代码
2.2.烧写
1、点击make
2、点击Download and Debug
成功无报错以后再点击运行按钮即可成功烧录
IAR创建工程及烧录就分享到这里,谢谢观看!