Compilation of WaveHC fails on Linux

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
aintaer
 
Posts: 8
Joined: Sun Jul 24, 2011 5:34 pm

Compilation of WaveHC fails on Linux

Post by aintaer »

Compiling the WaveHC library on Archlinux, using gcc-avr 4.6.0-1 (due to regression in 4.6.1), and binutils-avr 2.21.1-1 leads to the following linking error:

Code: Select all

avr-gcc -o "arduomo.elf"  ./src/main.o  ./src/WaveHC/FatReader.o ./src/WaveHC/SdReader.o ./src/WaveHC/WaveHC.o ./src/WaveHC/WaveUtil.o   -larduinoUno -lm -Wl,-Map,arduomo.map,--cref -s -Wl,--gc-sections -L"/home/aintaer/workspace/arduinoUno/m328p_16mhz" -mmcu=atmega328p
/home/aintaer/workspace/arduinoUno/m328p_16mhz/libarduinoUno.a(HardwareSerial.o): In function `_GLOBAL__sub_I_rx_buffer':
../src/HardwareSerial.cpp:177: multiple definition of `__vector_11'
./src/WaveHC/WaveHC.o:../src/WaveHC/WaveHC.cpp:41: first defined here
I built my own static library, but that shouldn't be the problem.
It seems the waveshield uses TIMER1 for the DAC, but I'm absolutely sure there's no other library using TIMER1. I cannot for the life of me find where the multiple definition is.

HardwareSerial.cpp:173-190

Code: Select all

HardwareSerial::HardwareSerial(ring_buffer *rx_buffer,
  volatile uint8_t *ubrrh, volatile uint8_t *ubrrl,
  volatile uint8_t *ucsra, volatile uint8_t *ucsrb,
  volatile uint8_t *udr,
  uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre, uint8_t u2x)
{
  _rx_buffer = rx_buffer;
  _ubrrh = ubrrh;
  _ubrrl = ubrrl;
  _ucsra = ucsra;
  _ucsrb = ucsrb;
  _udr = udr;
  _rxen = rxen;
  _txen = txen;
  _rxcie = rxcie;
  _udre = udre;
  _u2x = u2x;
}

aintaer
 
Posts: 8
Joined: Sun Jul 24, 2011 5:34 pm

Re: Compilation of WaveHC fails on Linux

Post by aintaer »

Figured it out. The problem was with my compilation of the arduino static library. Somehow the settings got wiped when building, and the library was building for the ATtiny instead of the ATmega328p like it was supposed to.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”