2 Replies Latest reply on Mar 23, 2015 12:01 PM by ForumMigrationAdmin

    Compiling libmraa with the IOTDK

    ForumMigrationAdmin

      I need to recompile libmraa for the Galileo running the current IOTDK image, using the IOTDK itself.  The instructions on github are not specific to that environment.  The generic instructions are:

      mkdir build cd build cmake .. make

      But that builds for the host environment, not the target and the resulting library is incompatible with the target kernel.

      There are what appear to be specific instructions for doing this for Edison using the old (I think) Edison SDK:

      source /opt/poky-edison/1.6/environment-setup-core2-32-poky-linux mkdir build cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/oe-sdk_cross.cmake .. make

      Again, this doesn't apply because I need a Galileo image. I don't know cmake, but I did install the Edison SDK and look at

      /opt/poky-edison/1.6/environment-setup-core2-32-poky-linux

      and it seems like it would just be a matter of duplicating the setting of the environment vars appropriate to the Galileo environment.  However, when I started considering that, I looked at how devkit-launcher.sh works and got confused by relocate_sdk.py/relocate_sdk.sh

      Could Matthias or someone familiar with the intimate details of how the IOTDK works give me a few hints on how to proceed?  I don't know when the mraa guys will get around to looking at the bug I think I found, but if I can compile the library I would have a fix/answer and could zip a patch to them right quick. Specifically a brief explanation of what relocate_sdk.py/relocate_sdk.sh does might sort me out.

      Thx, Dallas

        • 1. Re: Compiling libmraa with the IOTDK
          ForumMigrationAdmin

          Citazione:

          Dallas P. ha scritto:

           

          /opt/poky-edison/1.6/environment-setup-core2-32-poky-linux

          and it seems like it would just be a matter of duplicating the setting of the environment vars appropriate to the Galileo environment.  However, when I started considering that, I looked at how devkit-launcher.sh works and got confused by relocate_sdk.py/relocate_sdk.sh

          This works on the poky SDK not from the IDE that IOTDK is using. On linux there is a probably a way to hack it up to work, not 100% sure how to go about it though. If you have a board up and running with iotdk running I would just compile directly on the target


          Citazione:

          Dallas P. ha scritto:

           

          Could Matthias or someone familiar with the intimate details of how the IOTDK works give me a few hints on how to proceed?  I don't know when the mraa guys will get around to looking at the bug I think I found, but if I can compile the library I would have a fix/answer and could zip a patch to them right quick. Specifically a brief explanation of what relocate_sdk.py/relocate_sdk.sh does might sort me out.

          We're looking at your bug now Thanks for reporting!

          Brendan Le Foll

          • 2. Re: Compiling libmraa with the IOTDK
            ForumMigrationAdmin

            This works on the poky SDK not from the IDE that IOTDK is using. On linux there is a probably a way to hack it up to work, not 100% sure how to go about it though. If you have a board up and running with iotdk running I would just compile directly on the target

            Actually Brendan I didn't me to imply "Build libmraa using the IOTDK IDE" i.e. using Eclipse.  What I meant to say was "Build libmraa using the IOTDK toolchain" i.e. gcc and the rest of the associated tools beneath Eclipse.  They can't be seriously different than the Edison versions surely.  The reason I looked at devkit-launchers was that I knew it set some environmant vars prior to invoking Eclipse and I wanted to determine what that was about.  I originally thought it was to make it so Eclipse found the right executables/libraries/etc.  But on closer inspection I saw the machinations of relocate_sdk and thought maybe there is something else going on under the hood. 

            If I need to build on the target for the moment fine, but that isn't a solution the problem in the long term.  I'm not a tinkerer or student.  I'm a developer with real-live development schedules and customer commitments etc.  I need (and am required) to be able to solve this sort of thing in house.  I have to be able to compile the system code as well as my application.

            Thank you for looking at the problem.  I really do appreciate your efforts and those of the other Intel folks. I'm willing to lend a hand when possible like any good member of a community.  I'm pretty sure I could have dealt with this myself and simply handed you a solution.  Just point me to the tools is all.

            Dallas