Gast
#1118760
Hallo Leute, ich habe ein kleines Problem mit dem sprintf(string,"esl> %1.3lf um",x) bzw der Variable x. Nach der atof tritt das Problem auf. Wenn ich die Berechnung x=offset+x*factor; auskomentiere, funktionier alles einwandfrei. Das komplette Programm ist im Anhang. Wenn ich die Zeile drin lasse bekomme ich beim kompilieren die folgende Fehlermedung. Bitte um eure Hilfe oder oder nen Tip. Grüße Denis Jakel -------------------------------------------------------------------- Programmausschnitt: x=atof(string+3); x=offset+x*factor; // make problems in combination with sprintf... // //_delay_ms(1000); // sprintf(string,"esl> %1.3lf um",x); -------------------------------------------------------------------- Fehlermedung beim kompilieren: C:\ethernut-4.4.1\nutapp\rs232d>make install avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall -Wstrict-pr ototypes -Wa,-ahlms=rs232d.lst -DETHERNUT2 -D__HARVARD_ARCH__ -IC:/ethernut-4.4. 1/nutbld/include -IC:/ethernut-4.4.1/nut/include rs232d.c -o rs232d.o avr-gcc rs232d.o -mmcu=atmega128 -Wl,--defsym=main=0,-Map=rs232d.map,--cref -LC: /ethernut-4.4.1/nutbld/lib -Wl,--start-group C:/ethernut-4.4.1/nutbld/lib/nutini t.o -lnutpro -lnutos -lnutarch -lnutdev -lnutarch -lnutfs -lnutnet -lnutcrt -Wl, --end-group -o rs232d.elf c:/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr5\lib c.a(log. o): In function `log': (.text.fplib+0x3e): relocation truncated to fit: R_AVR_13_PCREL against symbol ` __mulsf3' defined in .text section in c:/winavr-20070525/bin/../lib/gcc/avr/4.1. 2/avr5\libgcc.a(_mul_sf.o) c:/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr5\lib c.a(log. o): In function `log': (.text.fplib+0x50): relocation truncated to fit: R_AVR_13_PCREL against symbol ` __addsf3' defined in .text section in c:/winavr-20070525/bin/../lib/gcc/avr/4.1. 2/avr5\libgcc.a(_addsub_sf.o) make: *** [rs232d.elf] Error 1 C:\ethernut-4.4.1\nutapp\rs232d> --------------------------------------------------------------------