兄弟在 调试这么个小程序的时候发现遇到了下面不可思意的问题,一直得不到解决,不知道是什么原因。
下面是源程序:
#include <iom128v.h> #include <macros.h>
#define uchar unsigned char #define uint unsigned int
void main(void) { uchar send[4]={0xc1,0xd2,0xe4,0xf5};
DDRA = 0xff; DDRB = 0xdb; DDRC = 0xff; DDRD = 0xfe; DDRG = 0xff;
PORTA = 0x00; PORTB = 0x00; PORTC = 0x00; PORTD = 0x32; PORTG = 0x00; SREG |= 0x80; //全局中断使能 UBRR0L = 0x0b; //系统时钟频率;7.3728MHZ 波特率:38.4kBPS UBRR0H = 0x00; UCSR0B = (1<<RXEN0)|(1<<TXEN0)|(1<<RXCIE0); //允许发送和接收,使能接收结束中断 UCSR0C = (1<<UPM01)|(1<<UPM00)|(1<<UCSZ01)|(1<<UCSZ00); //异步,奇校验,1位停止位,8位数据 while(1) { PORTA = send[0]; PORTC = send[1]; PORTA = send[2]; PORTC = send[3]; } }
下面是错误报告:
D:iccinimakew -f 123.mak iccavr -o 123 -LD:icclib -g -Wl-W -bfunc_lit:0.0x2000 -dram_end:0x2ff -bdata:0x100.0x2ff -dhwstk_size:16 -beeprom:1.4096 -fihx_coff -S2 @123.lk !E 1234.o(41): Code address 0 already contains a value !E 1234.o(41): Code address 0x1 already contains a value D:iccinimakew.exe: Error code 1 Done: there are error(s). Exit code: 1
程序的功能可以先不用考虑,语法也好像没有错误,是哪里的设置有问题?请问高手这是哪里的原因?俺先谢谢大哥了!!!
|