Go Down

Topic: avr-gcc with libc.a issue (Read 1 time) previous topic - next topic

on4tux

I want to use my linux home server to update sketches of my home automation arduino, to ease testing. I use the Makefile method (make all upload) which works flawlessly for basic sketches. Everything looks good until the near final step.

Code: [Select]

echo \#include \"WProgram.h\" > build-cli/rolluik_v1.cpp
cat  rolluik_v1.pde >> build-cli/rolluik_v1.cpp
/usr/bin/avr-g++ -MM -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions build-cli/rolluik_v1.cpp -MF build-cli/rolluik_v1.d -MT build-cli/rolluik_v1.o
cat build-cli/rolluik_v1.d > build-cli/depends.mk
rm build-cli/rolluik_v1.cpp
cat build-cli/rolluik_v1.d > build-cli/depends.mk
echo \#include \"WProgram.h\" > build-cli/rolluik_v1.cpp
cat  rolluik_v1.pde >> build-cli/rolluik_v1.cpp
/usr/bin/avr-g++ -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions build-cli/rolluik_v1.cpp -o build-cli/rolluik_v1.o
/usr/bin/avr-gcc -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -std=gnu99 /usr/share/arduino/hardware/arduino/cores/arduino/WInterrupts.c -o build-cli/WInterrupts.o
/usr/bin/avr-gcc -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -std=gnu99 /usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.c -o build-cli/pins_arduino.o
/usr/bin/avr-gcc -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -std=gnu99 /usr/share/arduino/hardware/arduino/cores/arduino/wiring.c -o build-cli/wiring.o
/usr/bin/avr-gcc -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -std=gnu99 /usr/share/arduino/hardware/arduino/cores/arduino/wiring_analog.c -o build-cli/wiring_analog.o
/usr/bin/avr-gcc -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -std=gnu99 /usr/share/arduino/hardware/arduino/cores/arduino/wiring_digital.c -o build-cli/wiring_digital.o
/usr/bin/avr-gcc -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -std=gnu99 /usr/share/arduino/hardware/arduino/cores/arduino/wiring_pulse.c -o build-cli/wiring_pulse.o
/usr/bin/avr-gcc -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -std=gnu99 /usr/share/arduino/hardware/arduino/cores/arduino/wiring_shift.c -o build-cli/wiring_shift.o
/usr/bin/avr-g++ -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp -o build-cli/HardwareSerial.o
/usr/bin/avr-g++ -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/hardware/arduino/cores/arduino/Print.cpp -o build-cli/Print.o
/usr/bin/avr-g++ -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/hardware/arduino/cores/arduino/Tone.cpp -o build-cli/Tone.o
/usr/bin/avr-g++ -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/hardware/arduino/cores/arduino/WMath.cpp -o build-cli/WMath.o
/usr/bin/avr-g++ -c -mmcu=atmega328 -DF_CPU=16000000 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino  -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp -o build-cli/main.o
/usr/bin/avr-gcc -mmcu=atmega328 -lm -Wl,--gc-sections -Os -o build-cli/rolluik_v1.elf build-cli/rolluik_v1.o  build-cli/WInterrupts.o  build-cli/pins_arduino.o  build-cli/wiring.o  build-cli/wiring_analog.o  build-cli/wiring_digital.o  build-cli/wiring_pulse.o  build-cli/wiring_shift.o  build-cli/HardwareSerial.o  build-cli/Print.o  build-cli/Tone.o  build-cli/WMath.o  build-cli/main.o
/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr5/libc.a(log.o):../../../libm/fplib/log.S:94: relocation truncated to fit: R_AVR_13_PCREL against symbol `__addsf3' defined in .text section in /usr/lib/gcc/avr/4.3.5/avr5/libgcc.a(_addsub_sf.o)
/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr5/libc.a(log.o):../../../libm/fplib/log.S:98: relocation truncated to fit: R_AVR_13_PCREL against symbol `__addsf3' defined in .text section in /usr/lib/gcc/avr/4.3.5/avr5/libgcc.a(_addsub_sf.o)
/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr5/libc.a(log.o):../../../libm/fplib/log.S:114: relocation truncated to fit: R_AVR_13_PCREL against symbol `__floatsisf' defined in .text section in /usr/lib/gcc/avr/4.3.5/avr5/libgcc.a(_si_to_sf.o)
/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr5/libc.a(pow.o):../../../libm/fplib/pow.S:212: relocation truncated to fit: R_AVR_13_PCREL against symbol `__mulsf3' defined in .text section in /usr/lib/gcc/avr/4.3.5/avr5/libgcc.a(_mul_sf.o)
/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr5/libc.a(inverse.o):../../../libm/fplib/inverse.S:50: relocation truncated to fit: R_AVR_13_PCREL against symbol `__divsf3' defined in .text section in /usr/lib/gcc/avr/4.3.5/avr5/libgcc.a(_div_sf.o)
/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr5/libc.a(modf.o):../../../libm/fplib/modf.S:88: relocation truncated to fit: R_AVR_13_PCREL against symbol `__subsf3' defined in .text section in /usr/lib/gcc/avr/4.3.5/avr5/libgcc.a(_addsub_sf.o)
make: *** [build-cli/rolluik_v1.elf] Error 1


I found already posts on forums talking about the '-lm' parameter and tried to move it around (in the /usr/share/arduino/Arduino.mk file), of course without result. Who can help?

Go Up