SoftwareSerial does not compile anymore on WeMos D1
Posted: Mon Jul 22, 2019 9:15 am
Hello!
Suddenly, my old code using SoftwareSerial stopped compiling recently. I think this might be related to recent esp8266 update to version 2.5.2
Any suggestions please?
Arduino IDE 1.8.9, ESP8266 2.5.2, board LOLIN(WeMos) D1 mini Lite
Here is the example of the code:
Here is the error message:
Suddenly, my old code using SoftwareSerial stopped compiling recently. I think this might be related to recent esp8266 update to version 2.5.2
Any suggestions please?
Arduino IDE 1.8.9, ESP8266 2.5.2, board LOLIN(WeMos) D1 mini Lite
Here is the example of the code:
Code: Select all
#include <SoftwareSerial.h>
SoftwareSerial remoteSerial = SoftwareSerial(D5, D6);
void setup() {}
void loop() {}
Here is the error message:
Code: Select all
Build options changed, rebuilding all
sketch_jul22b:4:52: error: use of deleted function 'SoftwareSerial::SoftwareSerial(const SoftwareSerial&)'
SoftwareSerial remoteSerial = SoftwareSerial(D5, D6);
^
In file included from /tmp/sketch_jul22b/sketch_jul22b.ino:2:0:
/home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:46:7: note: 'SoftwareSerial::SoftwareSerial(const SoftwareSerial&)' is implicitly deleted because the default definition would be ill-formed:
class SoftwareSerial : public Stream {
^
/home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:46:7: error: use of deleted function 'std::atomic<int>::atomic(const std::atomic<int>&)'
In file included from /home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:30:0,
from /tmp/sketch_jul22b/sketch_jul22b.ino:2:
/home/sk/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/atomic:601:7: error: declared here
atomic(const atomic&) = delete;
^
In file included from /tmp/sketch_jul22b/sketch_jul22b.ino:2:0:
/home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:46:7: error: use of deleted function 'std::atomic<int>::atomic(const std::atomic<int>&)'
class SoftwareSerial : public Stream {
^
In file included from /home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:30:0,
from /tmp/sketch_jul22b/sketch_jul22b.ino:2:
/home/sk/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/atomic:601:7: error: declared here
atomic(const atomic&) = delete;
^
In file included from /tmp/sketch_jul22b/sketch_jul22b.ino:2:0:
/home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:46:7: error: use of deleted function 'std::atomic<bool>::atomic(const std::atomic<bool>&)'
class SoftwareSerial : public Stream {
^
In file included from /home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:30:0,
from /tmp/sketch_jul22b/sketch_jul22b.ino:2:
/home/sk/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/atomic:487:7: error: declared here
atomic(const atomic&) = delete;
^
In file included from /tmp/sketch_jul22b/sketch_jul22b.ino:2:0:
/home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:46:7: error: use of deleted function 'std::atomic<unsigned int>::atomic(const std::atomic<unsigned int>&)'
class SoftwareSerial : public Stream {
^
In file included from /home/sk/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.h:30:0,
from /tmp/sketch_jul22b/sketch_jul22b.ino:2:
/home/sk/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/atomic:620:7: error: declared here
atomic(const atomic&) = delete;
^
exit status 1
use of deleted function 'SoftwareSerial::SoftwareSerial(const SoftwareSerial&)'