-->
Page 1 of 1

SoftwareSerial does not compile anymore on WeMos D1

PostPosted: Mon Jul 22, 2019 9:15 am
by Simeon
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:
Code: Select all#include <SoftwareSerial.h>
SoftwareSerial remoteSerial = SoftwareSerial(D5, D6);
void setup() {}
void loop() {}


Here is the error message:

Code: Select allBuild 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&)'

Re: SoftwareSerial does not compile anymore on WeMos D1

PostPosted: Sat Jul 27, 2019 10:38 pm
by Simeon
confirmed that it works with version 2.5.0 and fails with 2.5.1 and 2.5.2