Hilfe, Fehler beim Compilieren

Gast #75104
Lesenswert?

Hi,

beim Versuch, die Datei im Anhang zu übersetzen, erhalte ich folgende
Compilermeldungen:

===================================================================
set -e; avr-gcc -MM -mmcu=at90s2313 -I. -g -O0 -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall
-Wstrict-prototypes -Wa,-adhlns=clock.lst  -std=gnu99 clock.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > clock.d; \
[ -s clock.d ] || rm -f clock.d

-------- begin --------
avr-gcc (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.


Compiling: clock.c
avr-gcc -c -mmcu=at90s2313 -I. -g -O0 -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall
-Wstrict-prototypes -Wa,-adhlns=clock.lst  -std=gnu99 clock.c -o
clock.o
clock.c:10:26: avr/inttypes.h: No such file or directory
clock.c:13:24: avr/macros.h: No such file or directory
clock.c:28: warning: ignoring #pragma interrupt_handler
Crossing_interrupt
clock.c:29: warning: ignoring #pragma interrupt_handler IR_interrupt
clock.c:30: warning: ignoring #pragma interrupt_handler
Degre_interrupt
clock.c:31: warning: ignoring #pragma interrupt_handler
Ticker_interrupt
clock.c:93: warning: function declaration isn't a prototype
clock.c:93: warning: return type of `main' is not `int'
clock.c: In function `main':
clock.c:119: warning: implicit declaration of function `SEI'
make: *** [clock.o] Error 1

===================================================================

Was will mir der Compiler damit sagen? Was passt ihm  nicht?


Danke Joline
Angehängte Dateien:
Gast #75107
Lesenswert?

Jetzt, nachdem der Compiler alle Dateien findet, bekomme ich folgende
Meldung:

error: invalid lvalue in assignment

Als Fehlerzeile u.a. wird angezeigt:

PORTD = 0x0d;

Aber wenn ich mir andere Beispiele so anschaue, sieht das da auch nicht
anders aus.  :o(
Gast #75108
Lesenswert?

Also jetzt läuft der Compiler durch. Freu!
Ich habe statt io2313.h die io.h genommen. Wurde auch vom Compiler
empfohlen.
Aber jetzt will der Linker noch nicht:

-------------------------------------------------
Linking: clock.elf
avr-gcc -mmcu=at90s2313 -I. -g -O0 -funsigned-char -funsigned-bitfields
-fpack-struct -fshort-enums -Wall -Wstrict-prototypes
-Wa,-adhlns=clock.o  -std=gnu99 clock.o   --output clock.elf
-Wl,-Map=clock.map,--cref -lm
clock.o(.text+0x54): In function `main':
C:\WinAVR\examples\clock/clock.c:117: undefined reference to `SEI'
make: *** [clock.elf] Error 1
-------------------------------------------------

Er meint, 'SEI' sei nicht referenziert (Hat er sicher auch Recht.).
Ich habe 'interrupt.h' eingebunden. Damit sollte es doch gehen, oder?

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren