problems compile
frostflare
frostflare@bol.com.br
Fri Apr 2 12:11:00 GMT 2004
I am working with gcc on cygwin adn it is working well,
but it doesn't compile a C program to test the leds of
AT91EB40A board arm7, I can't compile it.
This is the command line:
$ /gnuarm/bin/arm-elf-
gcc /home/admin/gcctest/gcctest1/gcctest1.c
This is the error message:
In file included
from /home/admin/gcctest/gcctest1/gcctest1.c:18:
/gnuarm/lib/gcc-lib/arm-elf/3.3.3/include/io.h:35:
error: syntax error before "e
xtern"
/home/admin/gcctest/gcctest1/gcctest1.c:19: error:
syntax error before "typedef"
And this is the C program code:
#include <io.h>
typedef unsigned u08;
main()
{
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 help me?
__________________________________________________________________________
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/
More information about the Gcc-help
mailing list