* compile io
@ 2004-03-30 19:52 frostflare
0 siblings, 0 replies; only message in thread
From: frostflare @ 2004-03-30 19:52 UTC (permalink / raw)
To: gcc-help
I want to compile a C program that use leds at
AT91EB40A board using gcc on cygwin, but it does't
compile.
It show this errors messages:
In file included
from /home/admin/gcctest/gcctest1/gcctest1.c:17:
/usr/local/arm/lib/gcc-lib/arm-
elf/2.95.3/include/io.h:35: syntax error before `
extern'
/home/admin/gcctest/gcctest1/gcctest1.c:18: syntax
error before `typedef'
This the C program code:
/*
Title: AVR-GCC test program #1 for the STK200
eva board
Author: Volker Oth
Date: 4/1999
Purpose: Flashes the LEDs on Port B with a hard
coded delay loop
needed
Software: AVR-GCC
needed
Hardware: ATS90S8515/8535/2313/mega on
STK200/STK300 board
Note: To contact me, mail to
volkeroth@gmx.de
You might find more AVR related stuff at
my homepage:
http://members.xoom.com/volkeroth
*/
#include<io.h>
typedef unsigned char u08;
int main( void )
{
u08 led, i, j, k, DDRB, PORTB;
outp(0xff,DDRB); /* use all pins on PortB
for output */
led = 1; /* init variable
representing the LED state */
for (;;) {
outp(~led, PORTB); /* invert the output
since a zero means: LED on */
led <<= 1; /* move to next LED */
if (!led) /* overflow: start with
Port B0 again */
led = 1;
for (i=0; i<255; i++) /* outer delay loop */
for(j=0; j<255;j++) /* inner delay loop */
k++; /* just do something -
could also be a NOP */
}
}
Can somebody tell me what is happening?
and how i fix it?
Thankyou
Wellington
Brazil
__________________________________________________________________________
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-30 17:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-30 19:52 compile io frostflare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).