How to develop with Eclipse IDE under IGEP Technology

From IGEP - ISEE Wiki

Jump to: navigation, search

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