user23441: Please help me with this library "Softwareserial". The basic sketch does not work. Please look the errors:
    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:128:2: error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors

 #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors

  ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'bool SoftwareSerial::listen()':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:184:23: error: 'SREG' was not declared in this scope

     uint8_t oldSREG = SREG;

                       ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:185:9: error: 'cli' was not declared in this scope

     cli();

         ^

In file included from C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\cores\arduino/delay.h:27:0,

                 from C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\cores\arduino/Arduino.h:76,

                 from C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:43:

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setTX(uint8_t)':

C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\variants\arduino_zero/variant.h:62:82: error: invalid conversion from 'PortGroup*' to 'uint8_t {aka unsigned char}' [-fpermissive]

 #define digitalPinToPort(P)        ( &(PORT->Group[g_APinDescription[P].ulPort]) )

                                                                                  ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:360:18: note: in expansion of macro 'digitalPinToPort'

   uint8_t port = digitalPinToPort(tx);

                  ^

C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\variants\arduino_zero/variant.h:65:44: error: base operand of '->' is not a pointer

 #define portOutputRegister(port)   ( &(port->OUT.reg) )

                                            ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:361:27: note: in expansion of macro 'portOutputRegister'

   _transmitPortRegister = portOutputRegister(port);

                           ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setRX(uint8_t)':

C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\variants\arduino_zero/variant.h:62:82: error: invalid conversion from 'PortGroup*' to 'uint8_t {aka unsigned char}' [-fpermissive]

 #define digitalPinToPort(P)        ( &(PORT->Group[g_APinDescription[P].ulPort]) )

                                                                                  ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:371:18: note: in expansion of macro 'digitalPinToPort'

   uint8_t port = digitalPinToPort(rx);

                  ^

C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\variants\arduino_zero/variant.h:66:44: error: base operand of '->' is not a pointer

 #define portInputRegister(port)    ( &(port->IN.reg) )

                                            ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:372:26: note: in expansion of macro 'portInputRegister'

   _receivePortRegister = portInputRegister(port);

                          ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:383:31: error: 'table' was not declared in this scope

   for (unsigned i=0; i<sizeof(table)/sizeof(table[0]); ++i)

                               ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:399:38: error: 'digitalPinToPCICR' was not declared in this scope

     if (digitalPinToPCICR(_receivePin))

                                      ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:401:78: error: 'digitalPinToPCICRbit' was not declared in this scope

       *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));

                                                                              ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:401:79: error: '_BV' was not declared in this scope

       *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));

                                                                               ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402:37: error: 'digitalPinToPCMSK' was not declared in this scope

       *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));

                                     ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402:78: error: 'digitalPinToPCMSKbit' was not declared in this scope

       *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));

                                                                              ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:417:36: error: 'digitalPinToPCMSK' was not declared in this scope

   if (digitalPinToPCMSK(_receivePin))

                                    ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:418:77: error: 'digitalPinToPCMSKbit' was not declared in this scope

     *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));

                                                                             ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:418:78: error: '_BV' was not declared in this scope

     *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));

                                                                              ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'virtual size_t SoftwareSerial::write(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:453:21: error: 'SREG' was not declared in this scope

   uint8_t oldSREG = SREG;

                     ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:454:7: error: 'cli' was not declared in this scope

   cli();  // turn off interrupts for a clean txmit

       ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:458:26: error: 'XMIT_START_ADJUSTMENT' was not declared in this scope

   tunedDelay(_tx_delay + XMIT_START_ADJUSTMENT);

                          ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'virtual void SoftwareSerial::flush()':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:501:21: error: 'SREG' was not declared in this scope

   uint8_t oldSREG = SREG;

                     ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:502:7: error: 'cli' was not declared in this scope

   cli();

       ^
PLEASE HELP ME!


user4143: You're trying to use the AVR SoftwareSerial library with an ARM based board. It won't work. Ever.
There should be no need to use SoftwareSerial - the SAMD chips have multiple UART channels - just use one of those.

23441: <p>Please help me with this library "Softwareserial". The basic sketch does not work. Please look the errors:</p>

<pre><code>    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:128:2: error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors

 #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors

  ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'bool SoftwareSerial::listen()':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:184:23: error: 'SREG' was not declared in this scope

     uint8_t oldSREG = SREG;

                       ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:185:9: error: 'cli' was not declared in this scope

     cli();

         ^

In file included from C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\cores\arduino/delay.h:27:0,

                 from C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\cores\arduino/Arduino.h:76,

                 from C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:43:

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setTX(uint8_t)':

C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\variants\arduino_zero/variant.h:62:82: error: invalid conversion from 'PortGroup*' to 'uint8_t {aka unsigned char}' [-fpermissive]

 #define digitalPinToPort(P)        ( &amp;(PORT-&gt;Group[g_APinDescription[P].ulPort]) )

                                                                                  ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:360:18: note: in expansion of macro 'digitalPinToPort'

   uint8_t port = digitalPinToPort(tx);

                  ^

C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\variants\arduino_zero/variant.h:65:44: error: base operand of '-&gt;' is not a pointer

 #define portOutputRegister(port)   ( &amp;(port-&gt;OUT.reg) )

                                            ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:361:27: note: in expansion of macro 'portOutputRegister'

   _transmitPortRegister = portOutputRegister(port);

                           ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setRX(uint8_t)':

C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\variants\arduino_zero/variant.h:62:82: error: invalid conversion from 'PortGroup*' to 'uint8_t {aka unsigned char}' [-fpermissive]

 #define digitalPinToPort(P)        ( &amp;(PORT-&gt;Group[g_APinDescription[P].ulPort]) )

                                                                                  ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:371:18: note: in expansion of macro 'digitalPinToPort'

   uint8_t port = digitalPinToPort(rx);

                  ^

C:\Users\Vladyslav\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.0.9\variants\arduino_zero/variant.h:66:44: error: base operand of '-&gt;' is not a pointer

 #define portInputRegister(port)    ( &amp;(port-&gt;IN.reg) )

                                            ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:372:26: note: in expansion of macro 'portInputRegister'

   _receivePortRegister = portInputRegister(port);

                          ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:383:31: error: 'table' was not declared in this scope

   for (unsigned i=0; i&lt;sizeof(table)/sizeof(table[0]); ++i)

                               ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:399:38: error: 'digitalPinToPCICR' was not declared in this scope

     if (digitalPinToPCICR(_receivePin))

                                      ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:401:78: error: 'digitalPinToPCICRbit' was not declared in this scope

       *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));

                                                                              ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:401:79: error: '_BV' was not declared in this scope

       *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));

                                                                               ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402:37: error: 'digitalPinToPCMSK' was not declared in this scope

       *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));

                                     ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402:78: error: 'digitalPinToPCMSKbit' was not declared in this scope

       *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));

                                                                              ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:417:36: error: 'digitalPinToPCMSK' was not declared in this scope

   if (digitalPinToPCMSK(_receivePin))

                                    ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:418:77: error: 'digitalPinToPCMSKbit' was not declared in this scope

     *digitalPinToPCMSK(_receivePin) &amp;= ~_BV(digitalPinToPCMSKbit(_receivePin));

                                                                             ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:418:78: error: '_BV' was not declared in this scope

     *digitalPinToPCMSK(_receivePin) &amp;= ~_BV(digitalPinToPCMSKbit(_receivePin));

                                                                              ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'virtual size_t SoftwareSerial::write(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:453:21: error: 'SREG' was not declared in this scope

   uint8_t oldSREG = SREG;

                     ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:454:7: error: 'cli' was not declared in this scope

   cli();  // turn off interrupts for a clean txmit

       ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:458:26: error: 'XMIT_START_ADJUSTMENT' was not declared in this scope

   tunedDelay(_tx_delay + XMIT_START_ADJUSTMENT);

                          ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'virtual void SoftwareSerial::flush()':

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:501:21: error: 'SREG' was not declared in this scope

   uint8_t oldSREG = SREG;

                     ^

C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:502:7: error: 'cli' was not declared in this scope

   cli();

       ^
PLEASE HELP ME!
</code></pre>
 4143: <p>You're trying to use the AVR SoftwareSerial library with an ARM based board. It won't work. Ever.</p>

<p>There should be no need to use SoftwareSerial - the SAMD chips have multiple UART channels - just use one of those.</p>
