Everyware™ Software Framework

<<Previous     Quickstart     Next>>

PART 2. GETTING STARTED
Integrating ESF Tooling and Projects into Eclipse

 

Installing ESF

·         Download ESF Plugins

Setting Up ESF

·         Select Java Runtime Environment (JRE)

·         Set Compiler Compliance Level

·         Select Target Platform

Installing ESF

 

Download ESF Plugins

To download and install the ESF plugins into the Eclipse environment, run Eclipse and select Help -> Install New Software...  Click the Add... button to add a new download site.  Enter the address of the ESF update site (http://esfdownload.eurotech-inc.com/update_site) and click OK.  You will be prompted for a username and password to log into the update site.  The username and password should have been emailed to you when you registered with this site at http://esf.eurotech.com.

 

Figure 1  Adding the ESF Update Site

 

A top-level list of available components will be shown.  This will include at least some platform specific ‘Base Features’ and other components which may be available for download.  The Base Features consist of the service API (interface) bundles that are core components of the ESF platform.  Other APIs may be included in the ‘base’ bundles for vertical market components, and ‘source’ components include Eurotech’s implementations of the base service APIs.

 

Select the components to download by clicking the checkboxes.  At a minimum, the ‘Core Tooling and JVM Feature’ must be installed, along with at least one of the platform-specific Base Features.  More than one processor Base Feature may be installed as Eclipse components, which will allow subsequent selection of the target platform.

 

In the Example below if you have a Helios you would install at least the ‘Core Tooling and JVM Feature’ as well as the ‘Helios Base Feature’.  If you are also using the Cloud Services you should also install the ‘Eclipse MQTT Client’.  If you are interested in continuous build and integration tooling you could also install the ‘ESF Deployment Feature’.

 

Figure 2  Selecting the ESF Components to Install

 

Click Next to continue and Finish to accept the terms of the end-user license agreement.

 

Figure 3  Accepting the EULA

 

The download will probably take several minutes to complete.  Follow the prompt to restart Eclipse after the components have been installed.  You may also receive the warning shown in figure 4.

 

Figure 4  Confirming the Software Installation

 

Make sure to double check that you are using the proper update site.  If so, click OK to continue.  Again, make sure to restart Eclipse when prompted.

Import ESF Bundles into your Workspace

In the Package Explorer, select File -> Import and choose the ESF -> ESF Import Wizard entry, then click Next.

 

Figure 5  Opening the ESF Import Wizard

 

Choose the components to be imported, and click Finish.  For the purposes of this example and many of the code examples we are assuming that all of the components for a single platform are being imported.  In this example we are using the Helios as the reference platform.

 

Figure 6  Selecting the ESF Projects to Import

 

At this point the projects will begin copying to your workspace.  This will take some time.  Also, it is important to note there will be errors in your workspace after the import is complete.  The next steps will show you how to fix these.  Your workspace should now look similar to figure 7.

 

Figure 7  Workspace After ESF Import

Setting Up Eclipse

Select Java Runtime Environment (JRE)

Open Window-> Preferences and select “Java”, “Installed JREs”.  You should see something similar to what is shown in figure 8.  The default JRE will be what you have installed on your system.

 

Figure 8  Preferences Dialog

 

We need to add a custom JVM description.  To do so, click the Add... button, select “Execution Environment Description”, and click Next.

 

Figure 9  Adding a new JRE Description

 

Click the File... button, browse to the ECLIPSE_HOME/esf/j9/jvm/bin/ directory under the Eclipse installation.  ECLIPSE_HOME is the location where you installed Eclipse.  In our example install this would have been C:\eclipse\installs\eclipse_helios1\.  Now select the file ‘j9_2.4_atom_apogee_fcs_win_20091113.ee’ if you are running Windows or ‘j9_2.4_atom_apogee_fcs_linux_20091113.ee’ if you are running Linux.  You should now see what is shown in figure 10.

 

Figure 10  Adding the Harmony JRE

 

Then click Finish.  Now in the main preferences Window select Harmony as the base JVM to use as shown below.

 

Figure 11  Installed JREs After Adding Harmony

 

Set Compiler Compliance Level

Next, select the Java -> Compiler option, and set the “Compiler compliance level” to 1.4.  Click OK to exit preferences.  This may require the compiler to perform a full software build.  If prompted to perform one, select OK.

 

Figure 12  Setting the Compiler Compliance Level

 

Select Target Platform

The “Target Platform” will be selected depending on which Eurotech target processor system will be used.  If more than one target device is used, the Target Platform can be changed later when switching between target devices.  Preferably you would have a different workspace for use with a different target.

 

Locate and open the “.target” file in the Java project containing the target platform corresponding to the device you are compiling for, such as ‘eurotech_helios_esf_foundation.target’ in the project ‘com.esf.tooling.target.platform.product.eurotech.helios.esf_foundation’.

 

Figure 13  Finding the Target Platform Project

 

After opening the target platform definition click the link “Set as Target Platform” in the upper right.  This will reset the target platform, and rebuild the projects.

 

Figure 14  Setting the Target Platform

 

After setting the target platform you should have no errors in your workspace.  You can validate this by opening the ‘Problems’ tab in the lower right window pane of Eclipse.  You will likely have some warnings but should not have any errors.  Also, you should not have any red asterisks next to any of the projects in the package explorer (left pane showing the projects).  It should look similar to figure 15.

 

Figure 15  An Error Free Workspace

 

At this point you are ready to begin developing ESF based applications for your target platform.

 

<<Previous     Quickstart     Next>>

 

Copyright © 2010 Eurotech Inc.  All rights reserved.