Esp8266 project with mysensor library can't compile!!!!!



  • Hi,
    I try to use a github project for my house(https://github.com/emc2cube/MySWeMosIRShield)
    I'll try to compile the code but there are a lot of errors.
    I don't know why, this code can't compile.
    I've choosen Wemos D1 R1 board, my arduino IDE version is 1.8.6.
    I've tried to use mysensor library v2.3.0 and v2.2.0, always the same error message:

    ATTENTION : Faux .ci dossier dans la bibliothèque 'MySensors'
    ATTENTION : Faux .mystools dossier dans la bibliothèque 'MySensors'
    In file included from C:\Users\Frank\Documents\Arduino\libraries\MySensors-master/MySensors.h:420:0,

                 from C:\Users\Frank\Documents\Arduino\sketch_aug20a\sketch_aug20a.ino:141:
    

    C:\Users\Frank\Documents\Arduino\libraries\MySensors-master/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\Frank\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/pgmspace.h:10:0,

                 from C:\Users\Frank\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Arduino.h:256,
    
                 from sketch\sketch_aug20a.ino.cpp:1:
    

    C:\Users\Frank\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);

      ^
    

    C:\Users\Frank\Documents\Arduino\sketch_aug20a\sketch_aug20a.ino: In function 'void dumpRaw(decode_results*)':

    sketch_aug20a:616:39: error: 'USECPERTICK' was not declared in this scope

     uint32_t x = results->rawbuf[i] * USECPERTICK;
    
                                       ^
    

    C:\Users\Frank\Documents\Arduino\sketch_aug20a\sketch_aug20a.ino: In function 'void dumpCode(decode_results*)':

    sketch_aug20a:647:39: error: 'USECPERTICK' was not declared in this scope

     Serial.print(results->rawbuf[i] * USECPERTICK, DEC);
    
                                       ^
    

    Plusieurs bibliothèque trouvées pour "WiFiClient.h"
    Utilisé : C:\Users\Frank\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi
    Non utilisé : C:\Program Files (x86)\Arduino\libraries\WiFi
    Non utilisé : C:\Program Files (x86)\Arduino\libraries\WiFi
    Non utilisé : C:\Program Files (x86)\Arduino\libraries\WiFi
    Non utilisé : C:\Program Files (x86)\Arduino\libraries\WiFi
    exit status 1
    'USECPERTICK' was not declared in this scope

    Impossible de trouver boards.txt dans C:\Users\Frank\Documents\Arduino\hardware\esp8266com\bootloaders. Version pre-1.5 ?
    Impossible de trouver boards.txt dans C:\Users\Frank\Documents\Arduino\hardware\esp8266com\cores. Version pre-1.5 ?
    Impossible de trouver boards.txt dans C:\Users\Frank\Documents\Arduino\hardware\esp8266com\doc. Version pre-1.5 ?
    Impossible de trouver boards.txt dans C:\Users\Frank\Documents\Arduino\hardware\esp8266com\libraries. Version pre-1.5 ?
    Impossible de trouver boards.txt dans C:\Users\Frank\Documents\Arduino\hardware\esp8266com\package. Version pre-1.5 ?
    Impossible de trouver boards.txt dans C:\Users\Frank\Documents\Arduino\hardware\esp8266com\tests. Version pre-1.5 ?
    Impossible de trouver boards.txt dans C:\Users\Frank\Documents\Arduino\hardware\esp8266com\tools. Version pre-1.5 ?
    Impossible de trouver boards.txt dans C:\Users\Frank\Documents\Arduino\hardware\esp8266com\variants. Version pre-1.5 ?
    WARNING: Error loading hardware folder C:\Users\Frank\Documents\Arduino\hardware\esp8266com
    Aucune définition de matériel valide n'a été trouvée dans le dossier esp8266com.

    Could you help me please?


  • Mod

    Welcome to the MySensors community @coconuts

    Solution for this problem is available at https://forum.mysensors.org/topic/9558/error-compiling-gateway-for-esp8266-node-mcu-1-0-e12/



  • Thanks for you help.
    Now it compile, but there are a lot of errors due to multiple definition.:

    here is a part of my log:

    libraries\IRremoteESP8266\IRrecv.cpp.o:(.bss.irparams+0x0): multiple definition of `irparams'

    sketch\src\IRrecv.cpp.o:(.bss.irparams+0x0): first defined here

    c:/users/frank/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: Warning: size of symbol `irparams' changed from 16 in sketch\src\IRrecv.cpp.o to 208 in libraries\IRremoteESP8266\IRrecv.cpp.o

    libraries\IRremoteESP8266\IRrecv.cpp.o: In function `IRrecv::decode(decode_results*, irparams_t*)':

    C:\Users\Frank\Documents\Arduino\libraries\IRremoteESP8266\src/IRrecv.cpp:105: multiple definition of `IRrecv::disableIRIn()'

    sketch\src\IRrecv.cpp.o:sketch\src/IRrecv.cpp:156: first defined here

    libraries\IRremoteESP8266\IRrecv.cpp.o: In function `IRrecv::resume()':

    C:\Users\Frank\Documents\Arduino\libraries\IRremoteESP8266\src/IRrecv.cpp:111: multiple definition of `IRrecv::resume()'

    sketch\src\IRrecv.cpp.o:sketch\src/IRrecv.cpp:162: first defined here

    libraries\IRremoteESP8266\IRrecv.cpp.o: In function `IRrecv::enableIRIn()':

    C:\Users\Frank\Documents\Arduino\libraries\IRremoteESP8266\src/IRrecv.cpp:88: multiple definition of `IRrecv::enableIRIn()'

    sketch\src\IRrecv.cpp.o:sketch\src/IRrecv.cpp:139: first defined here

    libraries\IRremoteESP8266\IRrecv.cpp.o: In function `IRrecv::matchMark(unsigned int, unsigned int, unsigned char, short)':

    C:\Users\Frank\Documents\Arduino\libraries\IRremoteESP8266\src/IRrecv.cpp:415: multiple definition of `IRrecv::matchMark(unsigned int, unsigned int, unsigned char, short)'

    sketch\src\IRrecv.cpp.o:sketch\src/IRrecv.cpp:603: first defined here

    libraries\IRremoteESP8266\IRrecv.cpp.o: In function `IRrecv::matchSpace(unsigned int, unsigned int, unsigned char, short)':

    C:\Users\Frank\Documents\Arduino\libraries\IRremoteESP8266\src/IRrecv.cpp:436: multiple definition of `IRrecv::matchSpace(unsigned int, unsigned int, unsigned char, short)'

    sketch\src\IRrecv.cpp.o:sketch\src/IRrecv.cpp:626: first defined here

    libraries\IRremoteESP8266\IRrecv.cpp.o: In function `IRrecv::compare(unsigned short, unsigned short)':

    C:\Users\Frank\Documents\Arduino\libraries\IRremoteESP8266\src/IRrecv.cpp:462: multiple definition of `IRrecv::compare(unsigned short, unsigned short)'

    sketch\src\IRrecv.cpp.o:sketch\src/IRrecv.cpp:654: first defined here

    libraries\IRremoteESP8266\IRrecv.cpp.o: In function `IRrecv::decodeHash(decode_results*)':

    Do you have any idea?


  • Mod

    @coconuts looks like the IRrecv library is present both in your sketch folder and in the libraries folder? IRrecv Should probably only exist in the libraries folder.


Log in to reply
 

Suggested Topics

14
Online

11.4k
Users

11.1k
Topics

112.7k
Posts