freesoftware:winavr是不错。

[复制链接]
2182|0
 楼主| keer_zu 发表于 2007-6-20 12:01 | 显示全部楼层 |阅读模式
那位熟练winavr?
用它来编译一个WinAVR + AVR Studio程序时,
出错,是不是没有包含串口的头文件?还是两者对寄存器的定义不同?

下边是错误:
test.c:61: error: `UDR' undeclared (first use in this function)
test.c:61: error: (Each undeclared identifier is reported only once
test.c:61: error: for each function it appears in.)
test.c:62: error: `UCSRA' undeclared (first use in this function)
test.c:62: error: `TXC' undeclared (first use in this function)
test.c: At top level:
test.c:71: warning: function declaration isn't a prototype
test.c: In function `main':
test.c:79: error: `UBRRH' undeclared (first use in this function)
test.c:79: error: `UBRRL' undeclared (first use in this function)
test.c:79: error: `UCSRA' undeclared (first use in this function)
test.c:79: error: `UCSRB' undeclared (first use in this function)
test.c:79: error: `RXEN' undeclared (first use in this function)
test.c:79: error: `TXEN' undeclared (first use in this function)
test.c:79: error: `UCSRC' undeclared (first use in this function)
test.c:79: error: `UCSZ1' undeclared (first use in this function)
test.c:79: error: `UCSZ0' undeclared (first use in this function)
test.c:108: error: `RXC' undeclared (first use in this function)
test.c:110: error: `UDR' undeclared (first use in this function)
make.exe: *** [obj/test.o] Error 1
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1488

主题

12952

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部