Difference between revisions of "How to develop with Eclipse IDE under IGEP Technology"

From IGEP - ISEE Wiki

Jump to: navigation, search
m
m (Requirements)
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''under construction'''
 
 
 
= Overview  =
 
= Overview  =
  
Line 9: Line 7:
 
There are some requisites to follow this guide:  
 
There are some requisites to follow this guide:  
  
*[http://isee.biz/component/zoo/item/igep-virtual-machine-sdk-yocto IGEP SDK VM]: follow the [http://isee.biz/component/zoo/item/igep-sdk-software-user-manual IGEP&nbsp;SDK&nbsp;SOFTWARE&nbsp;USER&nbsp;MANUAL] (chapter 2.3 "Setting up and running the VM") or install [[How to install Eclipse IDE|Eclipse IDE]]<br>
+
*[https://www.isee.biz/support/downloads/item/igep-virtual-machine-sdk IGEP SDK VM]: follow the [http://isee.biz/component/zoo/item/igep-sdk-software-user-manual IGEP&nbsp;SDK&nbsp;SOFTWARE&nbsp;USER&nbsp;MANUAL] (chapter 2.3 "Setting up and running the VM") or install [[How to install Eclipse IDE|Eclipse IDE]] in your host computer
*[http://isee.biz/products/processor-boards IGEP Processor Board]  
+
*[https://www.isee.biz/products/igep-processor-boards IGEP Processor Board]  
*MicroSD Card (optional: If you want to upgrade your IGEP Firmware)  
+
*MicroSD Card (optional: If your board has Poky Firmware)  
*[http://labs.isee.biz/images/c/ca/Eclipse_examples.tar.bz2 Eclipse Examples] (with IGEP&nbsp;SDK VM is not necessary)<br>
+
*[http://labs.isee.biz/images/c/ca/Eclipse_examples.tar.bz2 Eclipse Examples] (with IGEP&nbsp;SDK VM is not necessary, there are included)
  
 
= Pre-installed software on IGEP Processors Boards  =
 
= Pre-installed software on IGEP Processors Boards  =
  
''(from [[Pre-installed software on IGEP Processors Boards]])''
+
''(from [[Pre-installed software on IGEP Processors Boards]])'' {{#lst:Pre-installed software on IGEP Processor Boards}}  
{{#lst:Pre-installed software on IGEP Processor Boards}}
 
  
 
= Using Eclipse IDE  =
 
= Using Eclipse IDE  =
Line 39: Line 36:
 
=== Import examples  ===
 
=== Import examples  ===
  
'''NOTE:''' These steps are not necessary if you use IGEP&nbsp;SDK&nbsp;VM  
+
'''NOTE:''' These steps are not necessary if you use IGEP SDK VM, examples are included by default
  
 
*[http://labs.isee.biz/images/c/ca/Eclipse_examples.tar.bz2 Download] examples  
 
*[http://labs.isee.biz/images/c/ca/Eclipse_examples.tar.bz2 Download] examples  
Line 58: Line 55:
 
| [[Image:Eclipse import4.PNG|331px]]
 
| [[Image:Eclipse import4.PNG|331px]]
 
|}
 
|}
 +
 +
'''<sup>Click to enlarge image</sup>'''
  
 
=== Build an autotools-based project  ===
 
=== Build an autotools-based project  ===
Line 77: Line 76:
 
*If the "open perspective" prompt appears, click "Yes" so that you in the C/C++ perspective.  
 
*If the "open perspective" prompt appears, click "Yes" so that you in the C/C++ perspective.  
 
*The left-hand navigation pane shows your project. You can display your source by double clicking the project's source file.
 
*The left-hand navigation pane shows your project. You can display your source by double clicking the project's source file.
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1"
 +
|-
 +
| [[Image:Eclipse newproject1.png|250px]]
 +
| [[Image:Eclipse newproject2.png|250px]]
 +
| [[Image:Eclipse newproject3.png|250px]]
 +
|-
 +
| [[Image:Eclipse newproject4.png|250px]]
 +
| [[Image:Eclipse newproject5.png|250px]]
 +
| [[Image:Eclipse newproject6.png|250px]]
 +
|}
 +
 +
'''<sup>Click to enlarge image</sup>'''
  
 
== Set up a connection between IGEP and Host computer  ==
 
== Set up a connection between IGEP and Host computer  ==
a
+
 
 +
In IGEP SDK VM is configured by default in Eclipse IDE 192.168.5.1 IP adress for IGEP. If you want use another IP address you should do a new connection configuration.
 +
 
 +
''(from [[How to install Eclipse IDE]])'' {{#lst:How to install Eclipse IDE|setup_connection}}
  
 
== Run programs remotely  ==
 
== Run programs remotely  ==
Line 93: Line 108:
 
*Use other option as you want like program arguments or commands to execute before application run  
 
*Use other option as you want like program arguments or commands to execute before application run  
 
*Finally run your program
 
*Finally run your program
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1"
 +
|-
 +
| [[Image:Eclipse run1.png|331px]]
 +
| [[Image:Eclipse run2.png|331px]]
 +
|-
 +
| [[Image:Eclipse run3.png|331px]]
 +
| [[Image:Eclipse run4.png|331px]]
 +
|}
 +
 +
'''<sup>Click to enlarge image</sup>'''
  
 
== Debug programs remotely  ==
 
== Debug programs remotely  ==
Line 107: Line 133:
 
*Click Debug  
 
*Click Debug  
 
*Accept the debug perspective if it’s not the default perspective.
 
*Accept the debug perspective if it’s not the default perspective.
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1"
 +
|-
 +
| [[Image:Eclipse debug1.png|250px]]
 +
| [[Image:Eclipse debug2.png|250px]]
 +
| [[Image:Eclipse debug3.png|250px]]
 +
|-
 +
| [[Image:Eclipse debug4.png|250px]]
 +
| [[Image:Eclipse debug5.png|250px]]
 +
| [[Image:Eclipse debug6.png|250px]]
 +
|-
 +
| [[Image:Eclipse debug7.png|250px]]
 +
| [[Image:Eclipse debug8.png|250px]]
 +
| [[Image:Eclipse debug9.png|250px]]
 +
|}
 +
 +
'''<sup>Click to enlarge image</sup>'''
  
 
= Other uses  =
 
= Other uses  =
  
== Explore IGEP filesystem remotely ==
+
== Explore IGEP filesystem remotely ==
 +
 
 +
You can manage your IGEP files using Remote System Explorer:
 +
 
 +
*Launch a remote terminal
 +
*Import/Export files
 +
*Rename files and folders
 +
*Copy, Paste, Delete, Cut ...
 +
*etc.
 +
 
 +
{| cellspacing="1" cellpadding="1" width="200" border="1"
 +
|-
 +
| [[Image:Eclipse remoteIGEP1.png|331px]]
 +
| [[Image:Eclipse remoteIGEP2.png|331px]]
 +
|-
 +
| [[Image:Eclipse remoteIGEP3.png|331px]]
 +
| [[Image:Eclipse remoteIGEP4.png|331px]]
 +
|}
 +
 
 +
'''<sup>Click to enlarge image</sup>'''

Latest revision as of 09:52, 31 December 2013

Overview

This guide can be helpful to learnt to develop applications under IGEP Boards using Eclipse IDE and IGEP SDK Yocto Toolchain.

Requirements

There are some requisites to follow this guide:

Pre-installed software on IGEP Processors Boards

(from Pre-installed software on IGEP Processors Boards) == Overview ==

If you have a brand new IGEP Processor Board you must know that it comes with a firmware provided and installed on it by ISEE.

By default, if you power up your board it will run the software on the flash. But you can prepare a MicroSD card and boot from it by inserting it to the MicroSD card reader of your IGEP Processor Board, as it has more priority than the flash.

The pre-installed software consists of a minimal Linux-based distribution with a lite X Window System and GNOME Mobile based applications created with Yocto Platform Builder.

About the pre-installed software

The pre-installed software consists of:

  • IGEP X-loader: a bootloader compatible with all IGEP Processor Boards.
  • IGEP Kernel: a Linux Kernel maintained by ISEE.
  • IGEP firmware Yocto: the software distribution consists of a lite X Window System and GNOME Mobile based applications created with Yocto tools

For more information about these specific sotware, read the following articles:

Other useful articles:


Igep forum.png If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat Irc.png

Using Eclipse IDE

(from How to install Eclipse IDE)

Eclipse is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written mostly in Java. It can be used to develop applications in Java and, by means of various plug-ins, other programming languages including Ada, C, C++, COBOL, Haskell, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy, Android and Scheme. One of these interesting plugins is the Yocto Eclipse IDE Plug-in.

The Yocto Eclipse IDE Plug-in integrates the functionality of the Yocto Project Application Development Toolkit (ADT) and toolchain into the Eclipse IDE. This allows its users direct access to deploy, build, run and debug your own project. More information about Eclipse software here.


Create and Build projects

You can create two types of projects on Yocto Eclipse IDE Plug-in: Autotools-based, or Makefile-based. The IGEP SDK Virtual Machine provides already some examples that can be used as a template for your project. The examples are:

  • C_example, autotools-based “Hello World” program written in C.
  • Cairo_example, generates a png file named hello.png.
  • Cpp_example, autotools-based “Hello World” program written in C++
  • Dbus_example, sends "Hello Wolrd!" using D-Bus message system.
  • Glib_example, simple “Hello World" written using Glib library.
  • Gstreamer_example, ogg audio player using Gstreamer.
  • Gtk_example, Hello World in GTK.
  • C_example_without_autotools, makefile-base “Hello World” program written in C.

Import examples

NOTE: These steps are not necessary if you use IGEP SDK VM, examples are included by default

  • Download examples
  • Located your downloaded file, in my case is inside /home/Downloads:
jdoe@ubuntu ~ $ cd Downloads/
  • Extract binaries:
jdoe@ubuntu ~/Downloads tar jxf Eclipse_examples.tar.bz2 -C ~/ 
  • Go to File menu -> Import...
  • Select General ->Existing projects into workspace
  • Locate examples and finish the assistant
Eclipse import1.PNG Eclipse import2.PNG
Eclipse import3.PNG Eclipse import4.PNG

Click to enlarge image

Build an autotools-based project

To create your own project based on a Yocto template and then display the source code, follow these steps:

  • Select File menu-> New -> Project.
  • Double click C/C++.
  • Double click C Project or C++ Project to create the project.
  • Expand Yocto ADT Project.
  • Select a template
  • Select Hello World ANSI C Autotools Project or Hello World C++
  • Autotools Project. This is an Autotools-based project based on a Yocto Project template.
  • Put a name in the Project name: field. Do not use hyphens as part of the name.
  • Click Next.
  • Add information in the Author and Copyright notice fields.
  • Be sure the License field is correct.
  • Click Finish.
  • If the "open perspective" prompt appears, click "Yes" so that you in the C/C++ perspective.
  • The left-hand navigation pane shows your project. You can display your source by double clicking the project's source file.
Eclipse newproject1.png Eclipse newproject2.png Eclipse newproject3.png
Eclipse newproject4.png Eclipse newproject5.png Eclipse newproject6.png

Click to enlarge image

Set up a connection between IGEP and Host computer

In IGEP SDK VM is configured by default in Eclipse IDE 192.168.5.1 IP adress for IGEP. If you want use another IP address you should do a new connection configuration.

(from How to install Eclipse IDE)

  • Go to Window menu -> Open Perspective -> Other...
  • Select Remote System Explorer
  • In "Remote System" window, right click: New -> Connection...
  • Select TCF system type
  • In "Host Name" field type your <IGEP IP address>
  • In TCF Connection Settings properties change Login:Required and Pwd.Required values to true
Eclipse network1.png Eclipse network2.png Eclipse network3.png Eclipse network4.png
Eclipse network5.png Eclipse network6.png Eclipse network7.png Eclipse network8.png

Click to enlarge image


Run programs remotely

Once you have compiled your program, use the following steps to run programs remotely:

  • Select Run menu-> Run Configurations...
  • In the left area, expand C/C++Remote Application.
  • Locate your project and select it to bring up a new tabbed view in the Run Configurations Dialog.
  • Enter the absolute path into which you want to deploy the application. Use the Remote Absolute File Path for C/C++Application: field. For example, enter /usr/bin/<program name>.
  • Select Remote Connection
  • If field is empty search your C/C++ Application
  • Use other option as you want like program arguments or commands to execute before application run
  • Finally run your program
Eclipse run1.png Eclipse run2.png
Eclipse run3.png Eclipse run4.png

Click to enlarge image

Debug programs remotely

Once your program can run in your IGEP device you debug your application. Follow these steps to debug the application.

  • Select Run menu-> Debug Configurations...
  • In the left area, expand C/C++Remote Application.
  • Locate your project and select it to bring up a new tabbed view in the Debug Configurations Dialog.
  • Enter the absolute path into which you want to deploy the application. Use the Remote Absolute File Path for C/C++Application: field. For example, enter /usr/bin/<program name>.
  • Select Remote Connection
  • If field is empty search your C/C++ Application
  • Use other option as you want like program arguments or commands to execute before application run.
  • Click Debug
  • Accept the debug perspective if it’s not the default perspective.
Eclipse debug1.png Eclipse debug2.png Eclipse debug3.png
Eclipse debug4.png Eclipse debug5.png Eclipse debug6.png
Eclipse debug7.png Eclipse debug8.png Eclipse debug9.png

Click to enlarge image

Other uses

Explore IGEP filesystem remotely

You can manage your IGEP files using Remote System Explorer:

  • Launch a remote terminal
  • Import/Export files
  • Rename files and folders
  • Copy, Paste, Delete, Cut ...
  • etc.
Eclipse remoteIGEP1.png Eclipse remoteIGEP2.png
Eclipse remoteIGEP3.png Eclipse remoteIGEP4.png

Click to enlarge image