[elektro] avr-gcc

Stolmár Tamás knight at borsodi.qualitis.hu
Fri Aug 1 13:54:36 CEST 2008


Csak 1 otlet:
az atmega32-specifikus headert nem kell includeolni?


----- Original Message ----- 
From: "zulu" <zulu at gportal.hu>
To: <elektro at tesla.hu>
Sent: Friday, August 01, 2008 1:14 PM
Subject: [elektro] avr-gcc


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

-----------------------------------------
          elektro[-flame|-etc]




More information about the Elektro mailing list