#include <iom16v.h>
#include <macros.h>
#define uchar unsigned char
#define uint unsigned int
void delay_ms(uint k) //子函数是子函数的形式,它写出来运行单片机不识别。只能由主函数来调用它
{uint i,j;
for(i=1;i<k;i++)
{
for(j=1;j<570;j++)
{
;
}
}
}
void main(void)
{
DDRB=0xff;
PORTB=0xff;
while(1)
{
PORTB=0xaa;
delay_ms(500);
PORTB=0x55;
delay_ms(500);
}
}
总是出现以下错误
C:\iccv7avr\bin\imakew -f XIXI.mak
iccavr -o XIXI -LC:\PROGRA~1\icc\lib -g -e:0x10000 -ucrtatmega.o -bfunc_lit:0x7c.0x10000 -dram_end:0x10ff -bdata:0x100.0x10ff -dhwstk_size:30 -beeprom:0.2048 -fihx_coff -S2 @XIXI.lk -lcatmega
!ERROR file 'xixi.o': undefined symbol 'pop_xgsetF000'
!ERROR file 'xixi.o': undefined symbol 'push_xgsetF000'
C:\iccv7avr\bin\imakew.exe: Error code 1
Done: there are error(s). Exit code: 1. Tue Dec 20 09:57:43 |