hi there i'm new to gcc and avr development and i've tried to make a
very simple program to turn on an LED connected to one of the pins.
cat led.c
#include <inttypes.h>
#include <avr/io.h>
int main(void)
{
sbi(DDRD, 1);
outb(PORTD,1);
}
and below you can see the error. i also tried i simple test program i
downloaded and i got similar errors, so i'm not sure what i'm doing wrong?
titan# avr-gcc led.c
In file included from led.c:2:
/usr/local/lib/gcc/avr/3.4.4/../../../../avr/include/avr/io.h:252:6:
warning: #warning "device type not defined"
led.c: In function `main':
led.c:6: error: `DDRD' undeclared (first use in this function)
led.c:6: error: (Each undeclared identifier is reported only once
led.c:6: error: for each function it appears in.)
led.c:7: error: `PORTD' undeclared (first use in this function)
_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list