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 🙂

    Br
    Michael


  • Mod

    @mcrahr thanks for confirming. Seems the problem was introduced in this commit: https://github.com/esp8266/Arduino/commit/5d5ea92a4d004ab009d5f642629946a0cb8893dd#diff-c4057a04e4c6a7aa42b62269d3cd13dfL60

    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:

    ets_update_cpu_frequency
    esp_yield
    esp_schedule
    init_done()
    __yield
    optimistic_yield
    resetInfo
    user_init
    core_release
    core_version
    

    I have created https://github.com/mysensors/MySensors/issues/1167 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....

    Thanks


  • 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 (https://forum.mysensors.org/topic/10763/arduino-ide-1-8-10-warning) and tried 1.8.9 and 1.8.8 but again no luck with these.

    Are my Tools settings correct?
    0_1573639107789_ToolsSettings.png



  • @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

48
Online

11.4k
Users

11.1k
Topics

112.7k
Posts