Eclipse example

Introduction

This is an example that can be used as a project inside the eclipse IDE (http://www.eclipse.org). This demonstrates how to the Java applications can be built from within the IDE. It also demonstrates how ANT (http://ant.apache.org) can also be used to build applications.

Configure Eclipse for building Lightfoot applications

Start up Eclipse, select Window->Preferences and add two 'Classpath Variables'.


This allows eclipse to find all the JAR files it needs when building applications.

Opening the project in eclipse

To open the project in eclipse, choose File->Import and select Existing project into Workspace.

Select the project to import as <LF_HOME>\examples\eclipse.


Finish the dialog and the project is opened and built.

Building the example using Eclipse  

The project will automatically be compiled within eclipse whenever you save a file. You should use this approach until the application correctly compiles with no errors or warnings. Once you are happy with this, you can build the Lighfoot application. Select the base of the project in the package explorer, and  then Project->Rebuilt project to rebuild the entire project.

Building the example using ANT

Change directory to the eclipse example
    cd %LF_HOME%\examples\eclipse

Run ant to build the example
    ant
   

Running the example

To run the example in the simulator
    lf2debug sw build\debug\eclipse_demo.lfa

To run the example on the board
    lfdownload build\nondebug\eclipse_demo.bin

Features

This example demonstrates the following SDK features.