2 Replies Latest reply on Jun 25, 2016 10:34 AM by myopenid

    Help with Cross Compiling

    intel_jassowski

      I'm attempting to go through the BSP guide to set up cross compiling for Edison.

      I was able to build the native SDK as described in section 2.1, but I'm a little unclear where I go from here.

      It sounds like I need Eclipse and ADT set up (?).

      I've followed the ADT installer instructions on https://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html

      and got to the ADT installer configuration file step.

      Do I need to do anything specific for Edison here (or will x86 be sufficient)?

       

      Or do I even need to do this at all: did section 2.1 create the tool chain for me?

       

      Can someone provide a pointer to an example of how to use the cross compiler tool chain?

        • 1. Re: Help with Cross Compiling
          Paul.Guermonprez

          Hi intel_jassowki,

           

          You can get the cross compile toolchain from the repository, (here Edison SW Downloads),

          or you can generate it from the source archive with the bitbake option -c populatesdk.

           

          Then, to install it, run the resulting bash script.

           

          Finally, to use the tool chain, you have many possibilities:

           

          #1) You use it "as is", sourcing the environment and running the appropriate gcc/g++ command.

          From slide #17 (NB: this was for Galileo, but it's very similar): IntelAcademic_IoT_07

           

          #2) You can chroot the root folder (the one in /opt/edison/...) and compile your program just like if you were on Edison (but with your computer's resources).

           

          #3) For developing integrated project, you should use an IDE like you suggested (Eclipse, Codeblock...) . You've to set it up to use the appropriate compiler.

          It's also possible to integrate a tool in the IDE to send your binaries to Edison via SSH.

          Take a look on page 18 for some clues: Intel-DeveKit-Tutorial-Guide.pdf

           

          There should be no Edison specific settings as the entire tool chain has been specifically built for Edison.

           

          Hope this helps.

          1 of 1 people found this helpful
          • 2. Re: Help with Cross Compiling
            myopenid

            Hi Paul.Guermonprez,

             

            I'd like to expand on this question a little.

             

            I'm attempting to build a kernel module from within the chroot environment that you mentioned in your answer #2. However, the build fails with the make complaining that there are missing kernel paths because it is using uname to locate build headers. I realize this can be workaround by providing the path in place of uname within the makefile, but then the the header files are still missing. So how to generate the header files?

             

            Regards, Heng.