您的位置:首页 > 其它

Source Insight配置WinAVR的具体步骤

2014-06-15 00:49 134 查看
Source Insight 配置 WinAVR 的具体步骤

配置WinAVR主要分2步:

1.选择Options->Custom Commands

a. 点击ADD按纽,在Command: 内写入编译器名,如WinAVR Compile

b. 在Run: 内写入命令make clean;make all;

c. 千万不要在Dir加目录,我试过了,make clern;make all;都不能通过.

d. 在Output复选lconic Window和Capture Putput.

e. 在Control单选Save Files First.

f. 在Source Links in Output选Parse Links in Output,Pattern自动显示^\([a-zA-Z].*\)(\([0-9][0-9]*\)).*

再选中Pattern:的File,then Line.

点击Close完成第1步设置.

2.选择Options->Menu Assignments

a. 在Command:下拉列表栏中选中步骤1建立的WinAVR Compile.

b. 在Menu:下拉列表栏选中Work

c. 点击Inset使Menu Contents下拉列表栏中显示WinAVR Compile

点击Ok完成第2步设置.此时主菜单会多出Work项!!!

以后就可以建立Project文件开始玩WinAVR了...

总之,Source Insight肯定比WinAVR的PN好看多了,也比其它"无敌环境"更无敌,但本人感到没多大帮助...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~20140615本人添加~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

建立好上述步骤后编译代码时遵循以下步骤

<1> 使用 WinAVR 向导创建一个 makefile 文件,并编写一个 demo.c 文件

demo.c 文件内容如下:

#include <avr\io.h>
//头文件包含,省略“c:\WINAVR-20071221\avr\include\”
int main(void)
{
return 0;
}


<2> 建立SI工程,将已经写好的 demo.c 和 makefile 文件拷贝至工程目录下

<3> 并将 makefile 文件中 TARGET 设置为

TARGET = demo
即语句 SRC = $(TARGET).c 执行后, SRC = demo.c 。否则 make 后会因为没有编译目标而报错
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: