arduino / ArduinoCore-sam

80 stars 107 forks source link

No matching function for call to 'HardwareSerial::begin(int, UARTClass::UARTModes)' #114

Closed itavero closed 3 years ago

itavero commented 3 years ago

I'm trying to compile the IBusBM library for the Arduino Due, but I'm getting the following error:

WARNING: library IBusBM claims to run on avr, esp32, stm32, mbed architecture(s) and may be incompatible with your current board which runs on sam architecture(s).
/Users/arnom/Documents/Arduino/libraries/IBusBM/src/IBusBM.cpp: In member function 'void IBusBM::begin(HardwareSerial&, int8_t, int8_t, int8_t)':
/Users/arnom/Documents/Arduino/libraries/IBusBM/src/IBusBM.cpp:91:36: error: no matching function for call to 'HardwareSerial::begin(int, UARTClass::UARTModes)'
     serial.begin(115200, SERIAL_8N1);
                                    ^
/Users/arnom/Documents/Arduino/libraries/IBusBM/src/IBusBM.cpp:91:36: note: candidate is:
In file included from /Users/arnom/Library/Arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/Arduino.h:195:0,
                 from /Users/arnom/Documents/Arduino/libraries/IBusBM/src/IBusBM.cpp:25:
/Users/arnom/Library/Arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/HardwareSerial.h:29:18: note: virtual void HardwareSerial::begin(long unsigned int)
     virtual void begin(unsigned long);
                  ^
/Users/arnom/Library/Arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/HardwareSerial.h:29:18: note:   candidate expects 1 argument, 2 provided
exit status 1
Error compiling for board Arduino Due (Native USB Port).

I know that the library claims to be incompatible, but I figured I'd try to compile it to figure out why it is incompatible. The library compiles without problems for just about any other board I've tried. Is there something I can fix on the library side, or is this really a problem in the BSP?

Related: bmellink/IBusBM#17

itavero commented 3 years ago

Looks like a duplicate of #31 actually.