GatawayESP8266 - Compile error



  • I installed on Windows 7 64bit: Arduino IDE 1.8.15, MySensors lib 2.3.2 and from "ESP8266 by ESP8266 Community" 3.0.0 board: NodeMCU 1.0 (ESP-12E Module). When trying to compile GatawayESP8266 (I only changed to my MY_WIFI_SSID and MY_WIFI_PASSWORD). I'm getting errors and can't compile it 😞
    [0_1621338567721_compile errors 1.txt](Uploading 100%)
    What am I doing wrong? 😞



  • Here is the beginning of a long list of errors

    Arduino:1.8.15 (Windows 7), Board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
    
    In file included from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\assert.h:10,
                     from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\sys\reent.h:503,
                     from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\stdlib.h:18,
                     from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\c++\10.2.0\cstdlib:75,
                     from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\c++\10.2.0\stdlib.h:36,
                     from C:\Users\K\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/Arduino.h:27,
                     from sketch\GatewayESP8266.ino.cpp:1:
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp: In function 'char* protocolMyMessage2Serial(MyMessage&)':
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp:94:28: error: expected ')' before '__INT8'
       94 |                   PSTR("%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%s\n"), message.getSender(),
          |                            ^~~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp:94:19: note: to match this '('
       94 |                   PSTR("%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%s\n"), message.getSender(),
          |                   ^~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp: In function 'char* protocolMyMessage2MQTT(const char*, MyMessage&)':
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp:103:31: error: expected ')' before '__INT8'
      103 |                   PSTR("%s/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 ""), prefix,
          |                               ^~~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp:103:19: note: to match this '('
      103 |                   PSTR("%s/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 ""), prefix,
          |                   ^~~~
    In file included from C:\Users\K\Documents\Arduino\libraries\MySensors/MySensors.h:43,
                     from C:\Downloads\mysensors\GatewayESP8266\GatewayESP8266.ino:114:
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp: In function 'bool _readFromClient(uint8_t)':
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:317:38: error: expected ')' before '__INT8'
      317 |     GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
          |                                      ^~~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/MyConfig.h:2139:43: note: in definition of macro 'DEBUG_OUTPUT'
     2139 | #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
          |                                           ^
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:317:5: note: in expansion of macro 'GATEWAY_DEBUG'
      317 |     GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
          |     ^~~~~~~~~~~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:317:19: note: to match this '('
      317 |     GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
          |                   ^~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/MyConfig.h:2139:43: note: in definition of macro 'DEBUG_OUTPUT'
     2139 | #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
          |                                           ^
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:317:5: note: in expansion of macro 'GATEWAY_DEBUG'
      317 |     GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
          |     ^~~~~~~~~~~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:328:38: error: expected ')' before '__INT8'
      328 |    GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
          |                                      ^~~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/MyConfig.h:2139:43: note: in definition of macro 'DEBUG_OUTPUT'
     2139 | #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
          |                                           ^
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:328:4: note: in expansion of macro 'GATEWAY_DEBUG'
      328 |    GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
          |    ^~~~~~~~~~~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:328:18: note: to match this '('
      328 |    GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
          |                  ^~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/MyConfig.h:2139:43: note: in definition of macro 'DEBUG_OUTPUT'
     2139 | #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
          |                                           ^
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:328:4: note: in expansion of macro 'GATEWAY_DEBUG'
      328 |    GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
          |    ^~~~~~~~~~~~~
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp: In function 'bool gatewayTransportAvailable()':
    C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:425:38: error: expected ')' before '__INT8'
      425 |     GATEWAY_DEBUG(PSTR("GWT:TSA:C=%" PRIu8 ",DISCONNECTED\n"), i);
          |                                      ^~~~~
    
    

    and so on



  • @skom Welcome! You're doing nothing wrong.

    It looks like some changes in the 3.0.0 release of the ESP6266 core that came out a few days ago is breaking most if not all MySensors example sketches for boards included in that package.

    I don't know what is causing this. It seems to be related to the PSTR macro - maybe someone with better understanding of this should have a look at it.

    As a workaround, you can downgrad the ESP8266 core from 3.0.0 to 2.7.4 in the Arduino boards manager and it should compile just fine.



  • Thank you :), version 2.7.4 works 🙂



  • @BearWithBeard Hello !

    I'm new to the forum. I just found out about MySensors today actually.

    I tried making my first gateway, and had the same exact problem as @skom
    A quick search brought me here.
    Looks like downgrading the ESP Board Library to 2.7.4 works fine indeed.

    Thank you sir.
    I love the Internet, and I love you guys. ❤



Suggested Topics

  • 4
  • 1
  • 1055
  • 4
  • 41
  • 1
  • 2
  • 5

189
Online

10.1k
Users

10.6k
Topics

109.0k
Posts