PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : problem mit notepad



fotomarco
01.05.2007, 19:42
das compilieren funktionierte mir gut ,jezt hab ich die asurolib instaliert und das notepad gibt mir folgenden eror :
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=asuro.lst asuro.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > asuro.d; \
[ -s asuro.d ] || rm -f asuro.d
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > test.d; \
[ -s test.d ] || rm -f test.d
-------- begin --------
avr-gcc --version
avr-gcc (GCC) 4.1.1 (WinAVR 20070122)
Copyright (C) 2006 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.

avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c -o test.o
In file included from asuro.h:34,
from test.c:1:
c:/winavr/bin/../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
test.c: In function 'main':
test.c:6: warning: implicit declaration of function 'MotoSpeed'
test.c:14: error: expected expression before 'else'
test.c: At top level:
test.c:21: error: expected identifier or '(' before '}' token
make.exe: *** [test.o] Error 1

damaltor
01.05.2007, 21:03
1. wenn du einen fehler hast, dann poste deinen code.

2. BITTE EDITIERE DEINEN BEITRAG UND GIB IHM EINEN VERÜNFTIGEN TITEL

3. einfach lesen:

fehler sind in test.c
in functin main: (also in der main-funktion)
test.c:6 Die funktion MotoSpeed existiert nicht es heisst MotorSpeed.
test.c:14 vor "else" fehlt was, entweder eine } oder ein ;
at top level: (also ausserhalb aller funktionen, wo eigentlich GAR NICHTS hingehört)
test.c:21: irgend etwas muss da sein, was da nicht hingehört, evtl eine } zu viel.

da steht immer zuerst in welcher datei, dann in welcher funktion, und die zahl ist die zeilennummer. in dieser zeile (oder kurz davor) ist dein fehler.

fotomarco
01.05.2007, 21:44
#include "asuro.h"

int main(void)
{
Init();

while(1);
return 0;
}







mit diesem einfachen program gibt er mir diesen fehler :

from test.c:1:
c:/winavr/bin/../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=asuro.lst asuro.c -o asuro.o
In file included from asuro.h:34,
from asuro.c:29:
c:/winavr/bin/../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
avr-gcc -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.o test.o asuro.o --output test.elf -Wl,-Map=test.map,--cref -lm
avr-objcopy -O ihex -R .eeprom test.elf test.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex test.elf test.eep
c:\WinAVR\bin\avr-objcopy.exe: there are no sections to be copied!
c:\WinAVR\bin\avr-objcopy.exe: --change-section-lma .eeprom=0x00000000 never used
make.exe: [test.eep] Error 1 (ignored)


,entschuldigt ich hab aus versehen doppelt und dreifach gepostet es lief mir nicht

damaltor
01.05.2007, 21:48
du sollst keinen leeren code posten sondern den bei dem du den fehler hattest... ich hab deine beiden oberen posts entfernt.

Christopher1
01.05.2007, 21:49
Übrigens ist oben rechts ein EDIT-Button ](*,)

fotomarco
03.05.2007, 23:19
problem geloest hate makefile vergessen
bin halt neuling

damaltor
04.05.2007, 11:22
BITTE BENUTZE DEN EDIT BUTTON. ICH HABE DEINE BEITRÄGE ZUSAMMENGEFASST.