[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] simple program

From: Timothy Smith
Subject: [avr-gcc-list] simple program
Date: Thu, 25 Aug 2005 16:32:12 +1000
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050721)

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);

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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]