[SOLVED] Compile error for ESP8266 Wifi Gateway



  • Trying to get the WiFI Gateway (http://www.mysensors.org/build/esp8266_gateway) built but I keep getting the following error message when trying to compile the code:

    Arduino: 1.6.5 (Windows 8.1), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"
    
    In file included from C:\Users\Thomas\Documents\Arduino\libraries\MySensors\MyGateway.cpp:13:0:
    C:\Users\Thomas\Documents\Arduino\libraries\MySensors\utility/MsTimer2.h:7:2: error: #error MsTimer2 library only works on AVR architecture
     #error MsTimer2 library only works on AVR architecture
      ^
    In file included from C:\Users\Thomas\Documents\Arduino\libraries\MySensors\MyGateway.cpp:14:0:
    C:\Users\Thomas\Documents\Arduino\libraries\MySensors\utility/PinChangeInt.h:103:19: fatal error: new.h: No such file or directory
       #include <new.h>
                       ^
    compilation terminated.
    Error compiling.
    
      This report would have more information with
      "Show verbose output during compilation"
      enabled in File > Preferences.
    

    Curious if anyone has seen this issue before or have any ideas on how to fix it (honestly not even sure what it means, still kind of new to all this).

    OS: Windows 8.1
    IDE: Arduino 1.6.5
    ESP8266 Board: NodeMcu Lua ESP8266 ESP-12E (www.banggood.com/NodeMcu-Lua-ESP-12E-WIFI-Development-Board-p-985891.html)


  • Mod

    @ATXCoder said:

    #error MsTimer2 library only works on AVR architecture

    Apparently the compiler is compiling for AVR (e.g. Arduino UNO) instead of ESP.
    Top line of your output however shows "Board: "NodeMCU 1.0 ..." Strange...

    Which MySensors branch/version do you use?

    You could try compiling using the suggestion:

     This report would have more information with
      "Show verbose output during compilation"
      enabled in File > Preferences.
    

    Maybe that output would help.



  • @Yveaux I tried both the 1.5 and Development MySensor libraries. I have re-downloaded the 1.5 MySenors Library and unzipped it into my sketchbook location. Yet I still get the same error. I have included the error report with verbose on

    Arduino: 1.6.5 (Windows 8.1), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"
    
    Using library EEPROM in folder: C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM 
    
    Using library SPI in folder: C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI 
    
    Using library ESP8266WiFi in folder: C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi 
    
    Using library MySensors in folder: C:\Users\Thomas\Documents\Arduino\libraries\MySensors 
    
    
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\GatewayESP8266MQTTClient.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\GatewayESP8266MQTTClient.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM\utility C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM\EEPROM.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\EEPROM\EEPROM.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI\utility C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI\SPI.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\SPI\SPI.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src\ESP8266WiFi.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\ESP8266WiFi\ESP8266WiFi.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src\ESP8266WiFiMulti.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\ESP8266WiFi\ESP8266WiFiMulti.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src\WiFiClient.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\ESP8266WiFi\WiFiClient.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\ESP8266WiFi\WiFiClientSecure.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src\WiFiServer.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\ESP8266WiFi\WiFiServer.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src\WiFiUdp.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\ESP8266WiFi\WiFiUdp.cpp.o 
    
    C:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266 -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\variants\nodemcu -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\EEPROM -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\SPI -IC:\Users\Thomas\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors\utility C:\Users\Thomas\Documents\Arduino\libraries\MySensors\MyGateway.cpp -o C:\Users\Thomas\AppData\Local\Temp\build2217209677853778315.tmp\MySensors\MyGateway.cpp.o 
    
    In file included from C:\Users\Thomas\Documents\Arduino\libraries\MySensors\MyGateway.cpp:13:0:
    C:\Users\Thomas\Documents\Arduino\libraries\MySensors\utility/MsTimer2.h:7:2: error: #error MsTimer2 library only works on AVR architecture
     #error MsTimer2 library only works on AVR architecture
      ^
    In file included from C:\Users\Thomas\Documents\Arduino\libraries\MySensors\MyGateway.cpp:14:0:
    C:\Users\Thomas\Documents\Arduino\libraries\MySensors\utility/PinChangeInt.h:103:19: fatal error: new.h: No such file or directory
       #include <new.h>
                       ^
    compilation terminated.
    Error compiling.
    

  • Mod

    @ATXCoder Well, from this log it is at least clear that the xtensa toolchain for ESP8266 is in use, so that is correct.
    Did you try with a clean skets & library directort, except for the mysensors library?
    Other than that, I don't have a clue... Maybe @hek has seen this before?



  • @Yveaux I switched to a different network, re-downloaded the 1.5 Library, erased everything in my sketchbook and library diretory, unzipped the 1.5 MySensor Library into my sketchbook direcctory and now it complies.

    So either it was my network connection flaking out and causing a corrupt download or I just had to completely wipe my sketchbook directory. In either case, thanks for the help!


  • Mod

    @ATXCoder said:

    either it was my network connection flaking out and causing a corrupt download

    Don't think so; it didn't compile, so it didn't even get to download.

    Anyway, glad you fixed it!


Log in to reply
 

Suggested Topics

  • 3
  • 5
  • 2
  • 1

13
Online

11.4k
Users

11.1k
Topics

112.7k
Posts