Hallo Felix

Ich kann dein Programm (mit auskommentiertem Speed) Fehler und warnungsfrei kompilieren. Irgendwas läuft wohl mit deinem Makefile schief:

Mein Make mit KamAVR:

avr-gcc -mmcu=atmega8 -Os -mno-interrupts -funsigned-char -funsigned-bitfields -Wall -Wstrict-prototypes -ggdb -c -DF_CPU=8000000UL -Wa,-acdhlmns=temp.lst temp.c -o temp.o
avr-gcc -mmcu=atmega8 -Os -mno-interrupts -funsigned-char -funsigned-bitfields -Wall -Wstrict-prototypes -ggdb temp.o asuro.o -o test.elf -Wl,-Map=test.map --cref -lm
avr-objcopy -j .text -j .data -O ihex test.elf test.hex
avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O ihex test.elf test_eeprom.hex
avr-objdump -d -S test.elf > test.lst



Felix Make:

C:\ASURO_src\FirstTry>make all
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) 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.

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
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
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:\Users\FELIXK~1\AppData\Local\Temp\make33804.sh: /c/WinAVR/bin/avr-objcopy: Invalid argument
make: [test.eep] Error 126 (ignored)
avr-objdump -h -S test.elf > test.lss
C:\Users\FELIXK~1\AppData\Local\Temp\make33805.sh: /c/WinAVR/bin/avr-objdump: Invalid argument
make: *** [test.lss] Error 126

> Process Exit Code: 2
Was das bedeutet kann ich auch nicht sagen. Mein KamAVR erzeugt seine Makefiles selbstständig.

Gruß

mic