Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 17366

Re: Geez I hate to ask: Linux+Eclipse+Xtools

$
0
0

Ok bro, so you're right.  Constructive and concrete would be more helpful and I didn't realize (because I didn't slow down to read carefully) that the IoTDevkit is really in Beta.  So maybe these observations will be useful.

 

First off I created a clean Kubuntu 14.04 x86_64 installation on a Dell Optiplex 745.  I chose this platform for a variety of reasons, mostly because it is the closest thing I could find to a distribution which Intel suggests would work.  I've read many documents suggesting various Debian flavors and a recent one suggesting Ubuntu 12.04 LTS.  Best I can tell 12.XX is EOL because when I install it, it isn't able to update and moans all the time about upgrading to the new release etc.  So 14.04 it is.

 

Next I downloaded the Devkit and the Devkit Galileo Linux image pointed to my Matthias (mhahn) in his previous posts.  The first time I tried to do that the site would not allow me to download the Linux version.  That was right around the initial release (according to this post: https://software.intel.com/en-us/blogs/2014/09/08/announcing-intel-iot-developer-kit) so maybe I should have set retry=2+ before initiating that step.  Maybe it site was in the process of being updated or something.  OOPS!   Anyway, I then extracted the kit to a dedicated directory in my user account on the host workstation.

 

Once I had the tools situated, I executed iotdk-ide-linux/devkit-launcher and Eclipse (kepler) fired right up.  I then chose the 1_c_helloworld project as a test drive.  All looked well.  I hit build from the toolbar which worked without a hitch.  Good so far.  When I tried to debug though, I hit a snag because I had the old "Big_Image" running on the target galileo board.  That ain't so good.  One, the Devkit environment is setup to link to libraries compiled for the Devkit image (I believe that is the case), and two, the gdbserver is not in the Big_Image.  I'm sure there are a host of other reasons this wouldn't work that I didn't explore.

 

So then I created an SD with the appropriate OS i.e. the IoTDevKit image.  There are a variety of ways to do this on a Linux host.  I just stuck a blank card in my reader, opened "kinfo" and told it to restore the image.  Using dd would likely have been the more appropriate procedure.

 

Suggestion #1: Put a brief set of instructions for doing this under Linux as there are instructions for Windows and OSX on the website.  Most Linux operators will likely know how to do it, but for completeness sake and for people new to Linux it might be useful.

 

After I booted the target with the new image I tried again and got the error message I detailed in a previous port regarding the missing "pyconfig.h".  I put a symlink to the 32-bit include directory in the the corresponding x86_64 directory and that got me in business.  From that point on I could modify/build/debug the example project with no problems

 

Suggestion #2: I'm not sure exactly how to fix this.  I imagine it is unique to 64-bit host environments.  The symlink seems to work ok so maybe it is as simple as that.

 

The logical next step was to create a new project based on the template already established in the DevKit examples.  So I went to the Eclipse toolbar:

 

File->New->C Project

 

I gave the new project a name and selected

 

Project Type->Executable->Hello World ANSI C Project

Tool Chain->Cross GCC

 

I then clicked through to the Next screens and left that all default until I got to:

 

Cross GCC Command->Cross Compiler Prefix

 

Which I set to:

 

"i586-poky-linux-"

 

and then clicked finish.  Here is where the first problem showed up.  I had to go in and change a bunch of project setting. Primarily the include paths.  I right-clicked on the new project and took the properties @ the bottom:

 

Properties->C/C++ Build->Settings->Cross GCC Compiler->Includes->Include paths (-I)->Add

 

and inserted this: "${DEVKIT_HOME}/devkit-x86/sysroots/i586-poky-linux/usr/include" into the dialog.

 

your mileage may vary if you are running on a 32-bit host.  There are a couple of other things as well:

 

Properties->C/C++ Build->Settings->Tool Setting->Cross GCC Compiler->Optimization->(-Os)

Properties->C/C++ Build->Settings->Tool Setting->Cross GCC Compiler->Miscellaneous->Other Flags->${CFLAGS}

Properties->C/C++ Build->Settings->Error Parsers->[GNU gcc/g++ Error Parser] [GNU Assembler Error Parser] [GNU Linker Error Parser] /*select these only */

Properties->C/C++ Build->Settings->Tool Setting->Cross GCC Linker->Miscellaneous->Linker Flags->${LDFLAGS}

Properties->C/C++ Build->Settings->Tool Setting->Cross GCC Assembler->General->Include paths (-I)->Add->"${DEVKIT_HOME}/devkit-x86/sysroots/i586-poky-linux/usr/include"

 

This was copied from the 1_c_helloworld example project.  After I applied these change all the errors went away but one.  The source file template had this line in it:

 

return EXIT_SUCCESS;

 

which was not resolved.  The example code had:

 

return (0);

 

So I changed my code to that which cleared the last error.  Everything worked fine from there.

 

Suggestion #3: Configure a project template (maybe with a different name. "Galileo C Project"?) that will essentially produce a blank project exactly like 1_c_helloworld or something similar.

 

In any event I was able to get the environment working and I have JTAG boxes arriving early next week that I hope to integrate as well. I know that has been done successfully by others.  I don't know if these issues are unique to my experience but I suspect not. Really, it would be useful to have some kind of basic installation instructions with maybe a little troubleshooting section of something.

 

Suggestion #4: Two words: "IotDevKit Howto"

 

Dallas


Viewing all articles
Browse latest Browse all 17366

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>