5 Replies Latest reply on Jan 21, 2015 3:13 PM by KurtE

    Breakout && MRAA

    Geckoscraps

      I have spent nearly two weeks now trying to make MRAA work on the breakout board with C++. I have tried building, reflashing, and even trying to build from AlexT's repo. I cannot find any help and documentation on anything Edison seems to be absolutely shoddy at best. Something I wanted to try was updating libmraa0... however due to poor documentation all I can find is literally nothing on how to update given libraries through opkg or any other way.

       

      The only information I can find is through "opkg info libmraa0":

      root@Geckoscraps:/usr/share/mraa/examples/build# opkg info libmraa0

      Package: libmraa0

      Version: 0.4.4c-r0

      Depends: libgcc1 (>= 4.8.2), python-core, libpython2.7-1.0 (>= 2.7.3), libstdc++               6 (>= 4.8.2), libc6 (>= 2.19)

      Status: install user installed

      Architecture: core2-32

      Installed-Time: 1413293561

       

      Any help would be beyond appreciated.

        • 1. Re: Breakout && MRAA
          Geckoscraps

          Well, I figured out how to update libmraa0:

           

          root@Geckoscraps:/usr/share/mraa/examples# opkg info libmraa0

          Package: libmraa0

          Version: 0.5.4.91

          Provides: libmraa-dev, libmraa-dbg, libmraa-doc, libmaa-dev, libmaa-dbg, libmaa-doc, libmaa0

          Replaces: libmraa-dev, libmraa-dbg, libmraa-doc, libmaa-dev, libmaa-dbg, libmaa-doc, libmaa0

          Conflicts: libmraa-dev, libmraa-dbg, libmraa-doc, libmaa-dev, libmaa-dbg, libmaa-doc, libmaa0

          Status: install user installed

          Section: libs

          Architecture: i586

          Maintainer: Intel IoT-Devkit

          MD5Sum: f993740f1b8f63346939455ae09f58d7

          Size: 246520

          Filename: libmraa0_0.5.4.91_i586.ipk

          Source: https://github.com/intel-iot-devkit/mraa

          Description: mraa built using CMake

          Installed-Time: 1421823050

           

          However, now when I try to compile blink-io.c found in /usr/share/mraa/examples the Edison returns:

          root@Geckoscraps:/usr/share/mraa/examples# g++ blink-io.c -o test.sh

          /tmp/ccO5xxdR.o: In function `main':

          blink-io.c:(.text+0x8b): undefined reference to `mraa_init'

          blink-io.c:(.text+0x96): undefined reference to `mraa_get_version'

          blink-io.c:(.text+0xc1): undefined reference to `mraa_gpio_init'

          blink-io.c:(.text+0x120): undefined reference to `mraa_gpio_dir'

          blink-io.c:(.text+0x137): undefined reference to `mraa_result_print'

          blink-io.c:(.text+0x164): undefined reference to `mraa_gpio_write'

          blink-io.c:(.text+0x17b): undefined reference to `mraa_result_print'

          blink-io.c:(.text+0x1a9): undefined reference to `mraa_gpio_write'

          blink-io.c:(.text+0x1c0): undefined reference to `mraa_result_print'

          blink-io.c:(.text+0x1f3): undefined reference to `mraa_gpio_close'

          blink-io.c:(.text+0x20a): undefined reference to `mraa_result_print'

          collect2: error: ld returned 1 exit status

          • 2. Re: Breakout && MRAA
            KurtE

            You need to have mraa linked into your example:

             

            g++ blink-io.c -o test.sh -lmraa

             

            Note: I did not try the command, so potential I missed something

            • 3. Re: Breakout && MRAA
              Geckoscraps

              I will try your suggestion when I make it back to my house, but even if it doesn't work I really appreciate the help. I was only introduced to command line compiling around a month ago, up intel then I only used an IDE. I wasn't trying to sound rude in my post, though I can understand if it gives off that impression.

              • 4. Re: Breakout && MRAA
                Geckoscraps

                Thank you very much! Though a bit disappointing that I put so much effort into such a simple solution.. But you know, the past is what it is, a good learning experience.

                • 5. Re: Breakout && MRAA
                  KurtE

                  You are welcome.


                  Believe me, we have all been there!  Still there was some things.  Like how to build different flavors of the kernel...