Many compilation errors with mySensor 2.2
-
Hi all,
I must be crazy, but I have a strange but big problem with version 2.2 of mySensor. I use it on esp8266 (Wemos), and with a previous version my program compiled without a problem. I upgraded to mySensor 2.2 and 2 problem arised. First my compilation first resulted in:
In file included from D:\users\DirkJan\Arduino\libraries\MySensors/MySensors.h:405:0, from D:\users\DirkJan\Arduino\Projecten\Project_WCsniffer\IoT21_WCsniffer010\IoT21_WCsniffer010.ino:31: D:\users\DirkJan\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 D:\users\DirkJan\Arduino\hardware\espressif\esp8266\cores\esp8266/pgmspace.h:10:0, from D:\users\DirkJan\Arduino\hardware\espressif\esp8266\cores\esp8266/Arduino.h:255, from sketch\IoT21_WCsniffer010.ino.cpp:1: D:\users\DirkJan\Arduino\hardware\espressif\esp8266/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 Fout bij het compileren voor board WeMos D1 R2 & miniSo I changed file MyMainESP8266.cpp and replace int for uint32_t. When I then compile the Sketch, it comes with the following load of errors:
Archiving built core (caching) in: C:\Users\DirkJan\AppData\Local\Temp\arduino_cache_514641\core\core_espressif_esp8266_d1_mini_CpuFrequency_160,VTable_flash,FlashSize_4M1M,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_None____,FlashErase_none,UploadSpeed_256000_8c8da037c528d73cc750ee74e4676a97.a C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o): In function `esp_yield': D:\users\DirkJan\Arduino\hardware\espressif\esp8266\cores\esp8266/core_esp8266_main.cpp:87: multiple definition of `esp_yield' sketch\IoT21_WCsniffer010.ino.cpp.o:D:\users\DirkJan\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:81: first defined here C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o): In function `esp_schedule': D:\users\DirkJan\Arduino\hardware\espressif\esp8266\cores\esp8266/core_esp8266_main.cpp:94: multiple definition of `esp_schedule' sketch\IoT21_WCsniffer010.ino.cpp.o:D:\users\DirkJan\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:89: first defined here C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o): In function `init_done()': D:\users\DirkJan\Arduino\hardware\espressif\esp8266\cores\esp8266/core_esp8266_main.cpp:144: multiple definition of `init_done()' sketch\IoT21_WCsniffer010.ino.cpp.o:D:\users\DirkJan\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:151: first defined here C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o): In function `__yield': D:\users\DirkJan\Arduino\hardware\espressif\esp8266\cores\esp8266/core_esp8266_main.cpp:98: multiple definition of `__yield' sketch\IoT21_WCsniffer010.ino.cpp.o:D:\users\DirkJan\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:94: first defined here C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o): In function `optimistic_yield': D:\users\DirkJan\Arduino\hardware\espressif\esp8266\cores\esp8266/core_esp8266_main.cpp:109: multiple definition of `optimistic_yield' sketch\IoT21_WCsniffer010.ino.cpp.o:D:\users\DirkJan\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:105: first defined here C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o):(.bss.resetInfo+0x0): multiple definition of `resetInfo' sketch\IoT21_WCsniffer010.ino.cpp.o:D:\users\DirkJan\Arduino\Projecten\Project_WCsniffer\IoT21_WCsniffer010/DJ_Tools.ino:63: first defined here C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o): In function `user_init': D:\users\DirkJan\Arduino\hardware\espressif\esp8266\cores\esp8266/core_esp8266_main.cpp:168: multiple definition of `user_init' sketch\IoT21_WCsniffer010.ino.cpp.o:D:\users\DirkJan\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:160: first defined here C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o):(.bss.core_release+0x0): multiple definition of `core_release' sketch\IoT21_WCsniffer010.ino.cpp.o:D:\users\DirkJan\Arduino\Projecten\Project_WCsniffer\IoT21_WCsniffer010/DJ_Tools.ino:63: first defined here C:\Users\DirkJan\AppData\Local\Temp\arduino_build_931425/arduino.ar(core_esp8266_main.cpp.o):(.ver_number+0x0): multiple definition of `core_version' sketch\IoT21_WCsniffer010.ino.cpp.o:(.ver_number+0x0): first defined hereWhat do i do wrong???
Thanks for any help,
Dirk Jan -
I certainly did.
When i compile the following Sketch, I do get the first compile error mentioned above:#define ESP8266 #define MY_BAUD_RATE 9600 #define MY_GATEWAY_ESP8266 #define MY_ESP8266_SSID "xxx" #define MY_ESP8266_PASSWORD "xxx" #define MY_PORT 5003 #define MY_GATEWAY_MAX_CLIENTS 2 #include <ESP8266WiFi.h> #include <ESP8266mDNS.h> #include <MySensors.h> void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: }What is wrong with this sketch (besides that it does nothing)?
-
I found out that the same errors occur if i load mySensor library 2.1 or 2.0. It is not related to 2.2 version of mySensor.
So what goes wrong? For this matter, I downloaded the ESP8266 hardware library again, and ran
python get.pySo the ESP8266 harware lib is the newest. And then still it generates all those error, again and again.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login