[elektro] avr-gcc
zulu
zulu at gportal.hu
Fri Aug 1 13:14:52 CEST 2008
Hi All!
Kérek 1 kis segítséget. Mi a baj ezzel a programmal:
/////////////////////////////////////////////////////////////////////////
#include "stdlib.h"
#include <avr/pgmspace.h>
#include "avr/io.h"
#include "avr/interrupt.h"
#include "uart.h"
#define UART_BAUD_RATE 9600
const char menu[] PROGMEM = "Main menu";
int main ( void )
{
uart_init( UART_BAUD_SELECT( UART_BAUD_RATE, F_CPU ) );
sei();
uart_puts_P( menu );
}
/////////////////////////////////////////////////////////////////////////
Eredmény:
Compiling: x.c
avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields
-fpack-struct -fshort-enums -Wall -Wstrict-prototypes -pedantic -Wa,-adhlns=x.lst -std=gnu99 -MD -MP -MF
.dep/x.o.d x.c -o x.o
x.c: In function 'main':
x.c:15: error: invalid initializer
make: *** [x.o] Error 1
-zulu
More information about the Elektro
mailing list