There is a linker issue when using any code that wants to use Wire(I2C) other then the code that’s a I2C hack for raspberry<->controller communication. I’d like to use some other pololu libraries, like the one for the LSM303 or the one for the vl53l0x but i can’t include them in the sketch due to this bug.
Is there a way around this ? Is this a known issue ?
Arduino is at version 1.8.5 i’m using the latest code from github for the board definitions and the arduino slave library itself
A simple project that demonstrates the error is attached
pololu_slave.ino (2.1 KB)
Linking everything together...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega32u4 -o "C:\Users\atom\AppData\Local\Temp\arduino_build_564325/pololu_slave.ino.elf" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\sketch\pololu_slave.ino.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\lsm303-arduino\LSM303.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Timer\Event.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Timer\Timer.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Adafruit_NeoPixel\esp8266.c.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Servo\avr\Servo.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Servo\nrf52\Servo.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Servo\sam\Servo.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Servo\samd\Servo.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Servo\stm32f4\Servo.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\a-star-32u4-arduino-library\AStar32U4.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\a-star-32u4-arduino-library\AStar32U4Motors.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\a-star-32u4-arduino-library\PololuBuzzer.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\a-star-32u4-arduino-library\PololuHD44780.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\a-star-32u4-arduino-library\Pushbutton.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\pololu-rpi-slave-arduino-library\PololuTWISlave.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Wire\Wire.cpp.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Wire\utility\twi.c.o" "C:\Users\atom\AppData\Local\Temp\arduino_build_564325/..\arduino_cache_247973\core\core_pololu-a-star_avr_a-star32U4_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\Users\atom\AppData\Local\Temp\arduino_build_564325" -lm
C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_readFrom':
(.text+0x0): multiple definition of `__vector_36'
C:\Users\atom\AppData\Local\Temp\arduino_build_564325\libraries\pololu-rpi-slave-arduino-library\PololuTWISlave.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status