Error compiling gateway for esp8266 node mcu(1.0) e12
mcrahr last edited by mfalkvidd
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
@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.
mcrahr last edited by
I will try it out in a few minutes
mcrahr last edited by
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
@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); ^
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.
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)
sghazagh last edited by sghazagh
@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....
@sghazagh there is currently no planned release date.