Skip to content

Build fail in latest dev when defining Software Serial. #2592

@davebuk

Description

@davebuk

Device

D1 mini

Version

4f22960

Bug description

Hi

I'm trying to build the latest 'dev' branch for one of my devices defined below:

  #define MANUFACTURER            "WEMOS"
    #define DEVICE                  "PZEM004TV3"    // Software Serial

    // My config
    #define ALEXA_SUPPORT           0
    #define DOMOTICZ_SUPPORT        0
    #define HOMEASSISTANT_SUPPORT   0
    #define THINGSPEAK_SUPPORT      0
    #define NTP_TIMEZONE            TZ_Europe_London
    
    // Buttons
    #define BUTTON1_PIN             0    // D3
    #define BUTTON1_CONFIG          BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
    
    // LEDs
    #define LED1_PIN                2 // D4
    #define LED1_PIN_INVERSE        1
    
    // Extras
	
    #define PZEM004TV30_ADDRESS                0xF8
    #define UART_SUPPORT                1
    #define UART_SOFTWARE_SUPPORT       1
    #define UART1_BAUDRATE              9600
    #define UART1_TX_PIN                14
    #define UART1_RX_PIN                12
    #define PZEM004TV30_SUPPORT         1
    #define PZEM004TV30_PORT            1
		
    #define SENSOR_POWER_CHECK_STATUS    0

It fails to build with the error below. I tried changing line 322 and 337 to SoftwareSerial but that didn't help. Is there an issue with espurna\uart.cpp?

espurna\uart.cpp:322:13: error: 'SoftwareSerialConfig' in namespace '::' does not name a type; did you mean 'SoftwareSerial'?
  322 | constexpr ::SoftwareSerialConfig from_config(Config config) {
      |             ^~~~~~~~~~~~~~~~~~~~
      |             SoftwareSerial
espurna\uart.cpp: In function 'espurna::driver::uart::{anonymous}::BasePortPtr espurna::driver::uart::{anonymous}::software_serial_port(uint32_t, uint8_t, uint8_t, espurna::driver::uart::{anonymous}::Config, bool)':
espurna\uart.cpp:337:40: error: '::SoftwareSerialConfig' has not been declared; did you mean 'SoftwareSerial'?
  337 |     ptr->begin(baudrate, from_config<::SoftwareSerialConfig>(config));
      |                                        ^~~~~~~~~~~~~~~~~~~~
      |                                        SoftwareSerial
espurna\uart.cpp:337:68: error: no matching function for call to 'from_config<<expression error> >(espurna::driver::uart::{anonymous}::Config&)'
  337 |     ptr->begin(baudrate, from_config<::SoftwareSerialConfig>(config));
      |                                                                    ^
espurna\uart.cpp:173:13: note: candidate: 'template<class T> constexpr T espurna::driver::uart::{anonymous}::from_config(espurna::driver::uart::{anonymous}::Config)'
  173 | constexpr T from_config(Config);
      |             ^~~~~~~~~~~
espurna\uart.cpp:173:13: note:   template argument deduction/substitution failed:
espurna\uart.cpp:337:68: error: template argument 1 is invalid
  337 |     ptr->begin(baudrate, from_config<::SoftwareSerialConfig>(config));
      |                                                                    ^

Steps to reproduce

No response

Build tools used


PlatformIO Core 6.1.12a1
Python 3.9.10-final.0
System Type windows_amd64
Platform Windows-10
File System Encoding utf-8
Locale Encoding cp1252
PlatformIO Core Directory C:\Users*.platformio
PlatformIO Core Executable C:\Users*
.platformio\penv\Scripts\platformio.exe
Python Executable C:\Users***.platformio\penv\Scripts\python.exe
Global Libraries 0
Development Platforms 4
Tools & Toolchains 19


Any relevant log output (when available)

No response

Decoded stack trace (when available)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions