Error compiling gateway for esp8266 node mcu(1.0) e12

  • I did a clean install of the arduino IDE, installed the board manager, added the ESP8266 boards, and installed mySensor library.

    But i´m getting these compilation errors

    C:\Users\michael\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:218:6: error: previous declaration 'void ets_update_cpu_frequency(uint32_t)' here
     void ets_update_cpu_frequency(uint32_t ticks_per_us);
    exit status 1
    Error compiling for board NodeMCU 1.0 (ESP-12E Module).

    I only took the example, and did a verify.

    Any idea on what the problem is

  • Mod

    @mcrahr see if downgrading the esp8266 board definitions to 2.4.1 helps. 2.4.2 was released today, so you're probably the first person to try it.

  • @mfalkvidd
    I will try it out in a few minutes

  • Spot on correct downgrade to 2.4.1 then it works. Thanks, I did try a downgrade but to 2.2 and that did not work 🙂


  • Mod

    @mcrahr thanks for confirming. Seems the problem was introduced in this commit:

    And here is the full error message (OP's post did not include the full error message):

    In file included from R:\Documents\Arduino\libraries\MySensors/MySensors.h:420:0,
                     from R:\Documents\Arduino\libraries\MySensors\examples\GatewayESP8266MQTTClient\GatewayESP8266MQTTClient.ino:114:
    R:\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:57:53: error: declaration of C function 'void ets_update_cpu_frequency(int)' conflicts with
     extern "C" void ets_update_cpu_frequency(int freqmhz);
    In file included from C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/pgmspace.h:10:0,
                     from C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Arduino.h:256,
                     from C:\Users\Micke\AppData\Local\Temp\ArduinoBuild\sketch\GatewayESP8266MQTTClient.ino.cpp:1:
    C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:218:6: error: previous declaration 'void ets_update_cpu_frequency(uint32_t)' here
     void ets_update_cpu_frequency(uint32_t ticks_per_us);

  • Mod

    Looks like that commit introduced changes to the following declarations, which are now broken:


    I have created to track this problem but I do not understand c++ sufficiently to figure out what needs to be done.

  • Mod

    A change for the new board definitions is now available in the development branch and will be included in the next MySensors release (2.3.1 or 2.4.0, version not decided yet)

  • @mfalkvidd when will be the estimate release date of Mysensors library working with esp8266 v2.4.2?

    Getting compile error if I use 2.4.2 library for Lolin d1 mini pro device....


  • Mod

    @sghazagh there is currently no planned release date.

  • Hardware Contributor

    I just had the same problem, thank you @mcrahr for reporting and @mfalkvidd for supplying a simple workaround, now my MySensors installation is ready to be relaunched after a loooong break !

  • The problem I am having with compiling the sketch GatewayESP8266 to a NodeMCU board is the same as mentioned by mcrahr in his original post:
    exit status 1
    Error compiling for board NodeMCU 1.0 (ESP-12E Module)
    (and 64 pages of error messages)

    In my case the environment is:
    Arduino IDE 1.8.10 on Windows 10 PC
    MySensors library 2.3.1
    Board definitions ESP8266 2.6.0

    As suggested I have downgraded the board definitions to version 2.4.1 but that did not help.
    Also using the definition GenericESP8266 Module was not successful
    The simple Blink sketch compiles and uploads without problem.

    Suggestions for a solution are welcome.

  • Mod

    @bramz you’ll need 2.4.0, not 2.4.1.

    Edit: sorry, my bad. 2.4.1 is the confirmed version. Maybe the Arduino IDE must be restarted after downgrading?

  • @mfalkvidd : Thanks for the quick reply. Unfortunately a restart of the Arduino IDE did not solve the problem.
    I spotted a warning for Arduino IDE 1.8.10 ( and tried 1.8.9 and 1.8.8 but again no luck with these.

    Are my Tools settings correct?

  • @Bramz Hi, have you been able to compile the MySensors NodeManager for this ESP2866 board? I'm having similar problems. I'm now using Arduino IDE 1.8.12, MySensors 2.3.2, NodeManager 1.8. I've tried several versions of the ESP8266 library, but I get different errors with all of them. Have you been able to find a combination that compiles? Thanks in advance.

  • Hi Roland, yes in the end I managed to finish compiling without error. I tried with a Windows-10 machine, a Linux Ubuntu laptop and a RaspberryPi-4 and various versions of Arduino IDE, MySensors and NodeManager. Unfortunately, thereafter I got problems running the sketch and because of too little understanding of the NodeManager programming gave up for the time being. I dismantled my setup and cannot remember which combination of soft/hardware gave me compiling success in the end. It now seems that at least part of my problems may be due to the fact that I did not yet have a NRF24L01 hooked up to the ESP8266 so I will give things another try in the future.

Log in to reply

Suggested Topics