-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict Between Wifi101.h and SoftwareSerial.h #4534
Comments
Hi @mjmoore10,
This code is UNO specific and shouldn't be compiled for Mega. |
As per arduino/Arduino#4534, compile fails if using SoftwareSerial and Wifi101 together. This is due to the redefinition of PCINT0 ISR; since this ISR is only used to handle UNO (and since on UNO the SS-enabled pins 10/11 are already used by SPI), defining the ISR as weak will allow the sketch to compile fine on all platform (and be senseless on UNO)
As per arduino/Arduino#4534, compile fails if using SoftwareSerial and Wifi101 together. This is due to the redefinition of PCINT0 ISR; since this ISR is only used to handle UNO (and since on UNO the SS-enabled pins 10/11 are already used by SPI), defining the ISR as weak will allow the sketch to compile fine on all platform (and be senseless on UNO)
I'm delighted to have helped in some small way. And thank you very much for On Mon, Feb 8, 2016 at 1:45 AM, Martino Facchin notifications@github.com
Matthew J. Moore |
As per arduino/Arduino#4534, compile fails if using SoftwareSerial and Wifi101 together. This is due to the redefinition of PCINT0 ISR; since this ISR is only used to handle UNO (and since on UNO the SS-enabled pins 10/11 are already used by SPI), defining the ISR as weak will allow the sketch to compile fine on all platform (and be senseless on UNO)
If I try to use wifi101.h and softwareserial.h in the same sketch, I get the error messages below from the IDE. I'm a beginner, so I may well be wrong, but it looks to me like both header files define either functions or variables with the same names, which causes the conflict. If there's really a bug, I hope this report is helpful. If I'm just ignorant and this is an avoidable problem, I'd be grateful for any guidance.
Arduino: 1.6.7 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `__vector_9':
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:229: multiple definition of `__vector_9'
libraries\WiFi101\bsp\source\nm_bsp_arduino_avr.c.o:/nm_bsp_arduino_avr.c:67: first defined here
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `SoftwareSerial::read()':
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:394: multiple definition of `__vector_10'
libraries\WiFi101\bsp\source\nm_bsp_arduino_avr.c.o:/nm_bsp_arduino_avr.c:62: first defined here
libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `SoftwareSerial::read()':
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:394: multiple definition of `__vector_11'
libraries\WiFi101\bsp\source\nm_bsp_arduino_avr.c.o:/nm_bsp_arduino_avr.c:62: first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling.
The text was updated successfully, but these errors were encountered: