AVRGCC的F_CPU的错误(转载)
1.warning: #warning "F_CPU not defined for <util/delay.h>"
2.warning: "F_CPU" redefined
3.c:/winavr-20100110/lib/gcc/../../avr/include/util/delay.h:86:1: warning: this is the location of the previous definition
出现以上三种错误的解决办法是将#define F_CPU 1000000
放在在#include <util/delay.h>语句之前,如下:
#define F_CPU 1000000
#include <avr/io.h>
#include <util/delay.h>