Testato / SoftwareWire

Creates a software I2C/TWI bus on every pins
GNU General Public License v3.0
148 stars 33 forks source link

Linker error for Arduino Uno Wifi Rev.2 #18

Closed jgromes closed 3 years ago

jgromes commented 5 years ago

Hi,

There's a linker error in the library: when compiling examples for Arduino Uno Wifi Rev.2 (with Arduino.h patched from #17), linker returns the following error:

C:\Users\<username>\AppData\Local\Temp\<tempfile>.ltrans0.ltrans.o:(.rodata+0x38): undefined reference to `SoftwareWire::begin(unsigned char)'

collect2.exe: error: ld returned 1 exit status

This can be resolved by adding dummy begin methods into implemenation file:

void SoftwareWire::begin(uint8_t addr) { }
void SoftwareWire::begin(int addr) { }

I'm not sure why this only happens to Arduino Uno Wifi and not other boards.

facchinm commented 5 years ago

@jgromes does the library work as intended after applying the patch from #17 ? If so, would you mind posting a PR on https://github.com/arduino/ArduinoCore-megaavr so we can close https://github.com/arduino/ArduinoCore-megaavr/issues/14? Thanks!

jgromes commented 5 years ago

@facchinm I don't have the WiFi board, so I can't check it by myself. I'll open a PR once it's verified and working.

Testato commented 3 years ago

Fixed https://github.com/arduino/ArduinoCore-megaavr/pull/15