Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Compilation failure

Compilation failure

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 848 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mtedds
    wrote on last edited by
    #1

    Hi - I've been using MySensors for a while and have a growing HA capability now with my own controller and also Home Assistant.
    I use NodeMCU ESP8266s for everything - basically, every node is a WiFi, MQTT Gateway. That all works fine.
    This weekend, I came to build another node but it will no longer compile. I have spent many hours tearing down and re-installing the Arduino IDE but it continues to fail with the same error:

    <pre>
    In file included from c:\Users\mark\Documents\Arduino\libraries\MySensors/MySensors.h:441,
    from C:\Users\mark\AppData\Local\Temp.arduinoIDE-unsaved2023015-9648-6o2zl8.84f1\GatewayESP8266\GatewayESP8266.ino:114:
    c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'bool can_yield()':
    c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:95:9: error: 'cont_can_yield' was not declared in this scope; did you mean 'can_yield'?
    95 | return cont_can_yield(g_pcont);
    | ^~~~~~~~~~~~~~
    | can_yield
    c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void esp_yield_within_cont()':
    c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:101:2: error: 'cont_yield' was not declared in this scope; did you mean 'can_yield'?
    101 | cont_yield(g_pcont);
    | ^~~~~~~~~~
    | can_yield
    c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void loop_task(ETSEvent*)':
    c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:199:26: error: invalid operands of types 'void' and 'int' to binary 'operator!='
    199 | if (cont_check(g_pcont) != 0) {
    | ~~~~~~~~~~~~~~~~~~~ ^~ ~
    | | |
    | void int
    </pre>
    The above is the basic ESP8266 Gateway with no sensors and the RF removed - so as basic as it can be!

    I have tried all sorts of ways to hack it to bring the cont.h code in but I cannot get it to work.

    Any help would be really appreciated as this is really critical for my home network. If I can't sort this out I will have to completely rebuild the whole system using something else - and I'm not even sure what that might be! My controller is now a couple of thousand lines of code and I have some home-grown integrations to Shelly devices and a heat pump...

    Thanks,

    Mark.

    mfalkviddM 1 Reply Last reply
    0
    • M mtedds

      Hi - I've been using MySensors for a while and have a growing HA capability now with my own controller and also Home Assistant.
      I use NodeMCU ESP8266s for everything - basically, every node is a WiFi, MQTT Gateway. That all works fine.
      This weekend, I came to build another node but it will no longer compile. I have spent many hours tearing down and re-installing the Arduino IDE but it continues to fail with the same error:

      <pre>
      In file included from c:\Users\mark\Documents\Arduino\libraries\MySensors/MySensors.h:441,
      from C:\Users\mark\AppData\Local\Temp.arduinoIDE-unsaved2023015-9648-6o2zl8.84f1\GatewayESP8266\GatewayESP8266.ino:114:
      c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'bool can_yield()':
      c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:95:9: error: 'cont_can_yield' was not declared in this scope; did you mean 'can_yield'?
      95 | return cont_can_yield(g_pcont);
      | ^~~~~~~~~~~~~~
      | can_yield
      c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void esp_yield_within_cont()':
      c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:101:2: error: 'cont_yield' was not declared in this scope; did you mean 'can_yield'?
      101 | cont_yield(g_pcont);
      | ^~~~~~~~~~
      | can_yield
      c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void loop_task(ETSEvent*)':
      c:\Users\mark\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:199:26: error: invalid operands of types 'void' and 'int' to binary 'operator!='
      199 | if (cont_check(g_pcont) != 0) {
      | ~~~~~~~~~~~~~~~~~~~ ^~ ~
      | | |
      | void int
      </pre>
      The above is the basic ESP8266 Gateway with no sensors and the RF removed - so as basic as it can be!

      I have tried all sorts of ways to hack it to bring the cont.h code in but I cannot get it to work.

      Any help would be really appreciated as this is really critical for my home network. If I can't sort this out I will have to completely rebuild the whole system using something else - and I'm not even sure what that might be! My controller is now a couple of thousand lines of code and I have some home-grown integrations to Shelly devices and a heat pump...

      Thanks,

      Mark.

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      Welcome to the forum @mtedds

      If you haven't already, downgrade the esp8266 board definitions to 2.6.2. See also https://forum.mysensors.org/post/113281

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mtedds
        wrote on last edited by
        #3

        Wow - given the age of the most recent messages on here, I wondered if I would get a response.

        Many thanks for responding so quickly and my problem is resolved.

        [ Note I now also have PlatformIO installed and that compiled the sketch at the first attempt. I can't work out which version of the board it is using, as it uses different naming conventions, but I think it is the most recent. ]

        1 Reply Last reply
        0

        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
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        21

        Online

        12.0k

        Users

        11.2k

        Topics

        113.4k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular