Gast
#39994
Hallo Leute, ich habe ein Programm, das die Funktion qsort benutzen soll. Ich benutze WINAVR (WinAVR-20030424-bin-install.exe) und das Makefile aus den Samples (TARGET, SRC und MCU angepasst und extra Library) Wenn ich es für einen ATMEGA8 (oder -32) übersetze, kriege ich diese Meldungen: avr-gcc --version avr-gcc (GCC) 3.3 20030421 (prerelease) Copyright (C) 2002 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. -I../lib -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=main.lst main.c -o main.o avr-gcc -c -mmcu=atmega8 -I. -I../lib -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=zeitliste.lst zeitliste.c -o zeitliste.o avr-gcc -mmcu=atmega8 -I. -I../lib -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=main.o main.o zeitliste.o --output main.elf -Wl,-Map=main.map,--cref -lextra -lm -lm -Lc:/winavr/avr/lib -L../lib c:/winavr/avr/lib\libc.a(qsort.o): In function `qsort': qsort.o(.text+0xde): undefined reference to `__mulhi3' qsort.o(.text+0x136): undefined reference to `__mulhi3' qsort.o(.text+0x150): undefined reference to `__mulhi3' qsort.o(.text+0x172): undefined reference to `__mulhi3' qsort.o(.text+0x198): undefined reference to `__mulhi3' c:/winavr/avr/lib\libc.a(qsort.o)(.text+0x256): more undefined references to `__mulhi3' follow make.exe: *** [main.elf] Error 1 Wenn ich es für einen AT90S8515 übersetze, kriege ich diese Meldungen: avr-gcc --version avr-gcc (GCC) 3.3 20030421 (prerelease) Copyright (C) 2002 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=at90s8515 -I. -I../lib -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=main.lst main.c -o main.o avr-gcc -c -mmcu=at90s8515 -I. -I../lib -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=zeitliste.lst zeitliste.c -o zeitliste.o avr-gcc -mmcu=at90s8515 -I. -I../lib -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=main.o main.o zeitliste.o --output main.elf -Wl,-Map=main.map,--cref -lextra -lm -lm -Lc:/winavr/avr/lib -L../lib avr-objcopy -O ihex -R .eeprom main.elf main.hex avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex main.elf main.eep avr-objdump -h -S main.elf > main.lss Size after: text data bss dec hex filename 2088 330 42 2460 99c main.elf Errors: none Fehlt da in der library für die MEGAs die function __mulhi3 (Bug in avr-libc?) oder wie? Gibt es einen Workaround (ich will sortieren, aber die Sortierfunktion nicht selber schreiben)? wo ist evtl die Quelle zu __mulhi3? würde ich dann dazulinken Dank im Vorraus Berndt