hi Everyone,
i'm getting an error message when i try to compile and i am not sure why this error is popping up
Build started 22.12.2011 at 12:41:45 avr-gcc -mmcu=atmega64 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT monitor2.o -MF dep/monitor2.o.d -c ../monitor2.c avr-gcc -mmcu=atmega64 -Wl,-Map=mon2.map monitor2.o -o mon2.elf c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr5\libc.a(floatsisf.o): In function `__floatunsisf': (.text.avr-libc.fplib+0x0): multiple definition of `__floatunsisf' c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/avr5\libgcc.a(_usi_to_sf.o):c:\avrdev\gcc\build-avr\avr\avr5\libgcc/../../.././gcc/fp-bit.c:1391: first defined here make: *** [mon2.elf] Error 1 Build failed with 1 errors and 0 warnings...
I isolated the problem to this function in where i call 'log10( )' -
// ADC4 - Battery Temperature int NTCthermistor(void) { int temp = 0; double VtempC=0; double R_temp=0;// Sensor resistance - Ambient temp unsigned int ADC_t = 0; ADC_t = ReadADC(4); VtempC = ADC_t* 4.88281; // 5000[mV]/1024=4.88281 R_temp = 1.0 * VtempC / (5000.0 - VtempC); temp = 71.938 - 47.487*log10(R_temp); return temp; // [Celsius] }
i also use log10() in another function that seems to have the same problem. I am including the following libraries
#include#include #include #include #include #include #include #include #include #include
any ideas?
Thank you!
- Eric