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. Troubleshooting
  3. Errors compiling using 2.0 beta

Errors compiling using 2.0 beta

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 3 Posters 1.8k 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.
  • alfredbA Offline
    alfredbA Offline
    alfredb
    wrote on last edited by
    #1

    Hi,

    I'm getting errors compiling when using the 2.0 beta, anyone has an idea about the cause? I'm not signing anything in my code or enabled it. Please see the errors below:
    Arduino: 1.6.7 (Windows 10), Board: "Arduino/Genuino Uno" libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::init()'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/drivers/ATSHA204/sha256.cpp:35: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::ror32(unsigned long, unsigned char)' sketch\MySketch.ino.cpp.o:C:\Program Files (x86)Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here
    libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::hashBlock()'
    sketch\EthernetGateway-Kaku.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::addUncounted(unsigned char)'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::write(unsigned char)' sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::pad()'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::result()'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::initHmac(unsigned char const*, int)' sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here
    libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::resultHmac()'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of innerHash'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of keyBuffer'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here sketch\MySketch.ino.cpp.o: In function sendHeartbeat()': C:\Program Files (x86)\Arduino\libraries\MySensors/core/MySensorsCore.cpp:276: undefined reference to transportGetHeartbeat()'collect2.exe: error: ld returned 1 exit status
    exit status 1
    Error compiling.
    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.

    1 Reply Last reply
    0
    • mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      My guess is that you installed MySensors 2.0 without removing 1.x

      Try deleting the libraries folder and installing MySensors fresh from the development version.

      1 Reply Last reply
      0
      • alfredbA Offline
        alfredbA Offline
        alfredb
        wrote on last edited by
        #3

        Thanks! That solved most of the errors. The only one left now is;

        Arduino: 1.6.7 (Windows 10), Board: "Arduino/Genuino Uno" sketch\MySketch.ino.cpp.o: In function sendHeartbeat()': C:\Program Files (x86)\Arduino\libraries\MySensors/core/MySensorsCore.cpp:276: undefined reference to transportGetHeartbeat()'
        collect2.exe: error: ld returned 1 exit status
        exit status 1
        Error compiling.

        This report would have more information with
        "Show verbose output during compilation"
        enabled in File > Preferences.

        1 Reply Last reply
        0
        • alfredbA Offline
          alfredbA Offline
          alfredb
          wrote on last edited by alfredb
          #4

          Did some more testing, but also with an example sketch like HumiditySensor I get the same error In function `_processInternalMessages()':
          MySensorsCore.cpp:276: undefined reference totransportGetHeartbeat()'

          Anyone an idea?

          Thanks.

          tekkaT 1 Reply Last reply
          0
          • alfredbA alfredb

            Did some more testing, but also with an example sketch like HumiditySensor I get the same error In function `_processInternalMessages()':
            MySensorsCore.cpp:276: undefined reference totransportGetHeartbeat()'

            Anyone an idea?

            Thanks.

            tekkaT Offline
            tekkaT Offline
            tekka
            Admin
            wrote on last edited by tekka
            #5

            @alfredb I'm on Arduino 1.6.9 and AVR boards updated (1.6.11), most recent dev lib (2.0.0) and no issues compiling the example you mentioned. I suggest you update your installation including boards and give it a shot.

            1 Reply Last reply
            1
            • alfredbA Offline
              alfredbA Offline
              alfredb
              wrote on last edited by alfredb
              #6

              Thanks tekka! I have updated to IDE 1.6.9 (was on 1.6.7) and also found out I was using the wrong location for libraries (the libraries I copied to the program files folder in C:\Program Files(86)\Arduino, seems they belong in the documents folder of the user profile). After this indeed the example Sketch HumiditySensor now compiled without errors.

              On my particular sketch (I want to use send locally attached sensors through the ethernet gateway) I stil got the error. Now I started to compare the two and the error disappears when I include the MY_RADIO library (#define MY_RADIO_NRF24) in my sketch.

              Very happy that it's solved now. Thanks for your help!

              1 Reply Last reply
              1
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              15

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2019 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