C H A P T E R  7

Eclipse Development Environment

This chapter describes the Eclipse-based Teja Advance Development Environment (ADE) graphical user interface (GUI). Topics include:


ADE Introduction

Eclipse is an open source community where projects are focused on building extensive development platforms, runtimes, and application frameworks. Eclipse includes building, deploying, and managing software across the entire software life cycle.

Eclipse is more than a Java IDE. The Eclipse open source community has over 60 open source projects. These projects can be conceptually organized into seven different categories:

Refer to http:// www.eclipse.org for detailed information.


Starting the Eclipse-Based ADE GUI

Start the Eclipse-based ADE GUI by running bin/eclipse.sh from a shell terminal window.


procedure icon  To Start the Eclipse-Based ADE GUI

single-step bullet  Type:


% /opt/SUNWndps/tools/bin/eclipse.sh


Creating a Teja Project

To use the Eclipse-based Teja ADE, the user creates a project. A project can be created from scratch or from an already existing Teja application. In the latter case, the project can be created in the same directory as the application or in a different one but linking some files from the original application directory.


procedure icon  To Create a Project in the Same Directory as an Existing Teja Application

The following steps describe how to create a project in the same directory as an existing Teja application using examples/PacketClassifier as an example.

1. From the File menu, select New Project.

2. Choose Teja/Teja Project in the list of possible wizards, then click Next.

3. In the Project Name field, type the name of the project.

In this example, type PacketClassifier (the name does not need to match the name of the application).

4. To create the project in the directory of the application,

a. Deselect Use default.

b. Click the Browse button to get to the PacketClassifier directory.

c. Press OK.

Keeping Use default selected would create the project in the workspace. See FIGURE 7-1.

FIGURE 7-1 Eclipse-Based ADE GUI

You don not need to set the C/Make Project Setting tab, which defines the project and Builder settings, at this point.

In the Teja Project Settings tab, the information used to create the product specific graphic files is set. By default, these files have the same name as the project and are contained in the project directory. In the Graphic Files Info section, you can specify a different location and a different name, which will be the same for the three files with extension tjh, tjs and tjm. You can select whether to generate all three graphic files, or a subset, by putting a tag in the list in the General section.

You can populate the Teja Project Setting (FIGURE 7-2) tab in two ways:

In both ways, only the selected graphics files will be generated. Press the Finish button and a project is then created.

FIGURE 7-2 Teja Project Settings

You can also specify only the project name and directory and press Finish. The project is created without the graphic files, which can be added in a second step.


procedure icon  To Add the Graphic Files to a Project

1. In the Navigator view, right-click on the directory name inside the project where you would like to have the graphic files.

2. Open New/Other/Teja/Teja Graphic Files and press Next.

You get the Teja Project Settings tab. You need to fill this out as described in To Create a Project in the Same Directory as an Existing Teja Application.


Files and Viewers

The Eclipse-based Teja ADE can view three Teja elements: hardware architecture, software architecture, and mapping. To display the Teja element, the viewer uses the graphical information stored in separate files, one for each part of the application. These files are created when the project is created and have the same name as the project but with different extensions, tjh for the hardware architecture, tjs for the software architecture, and tjm for the mapping. These files contain the name of the library and entry function name and some graphical data such as the coordinates of the various objects, orientation, and type of routing.

After a project is created, it is visible in the Navigator tab by expanding and showing all the files and directories of the application, in addition to the graphical files. Double-clicking on these files opens a viewer for the element associated to the files.

Hardware Architecture Viewer

The Hardware Architecture Viewer (FIGURE 7-3) gives a graphical representation of the hardware architecture. Since hardware architectures can contain other hardware architectures, you can navigate the containment by double-clicking on architectures. The Outline tab provides a more straightforward visualization of the containment and the objects that a hardware architecture contains. To open this tab, go to the Window/Show view/Outline menu. Click any element in the outline to select the same element in the viewer, possibly changing the architecture shown to the one containing the selected object.

FIGURE 7-3 PacketClassifier Hardware Architecture - Inner Hardware

FIGURE 7-4 PacketClassifier Hardware Architecture - Outer Hardware

Netra DPS objects have properties with values of potential interest. The Properties tab displays such properties and their values. To open the Properties tab, go to the Window/Show view/Others/Properties menu. Along with the application properties there are also the GUI properties, some of which can be changed. For example, a bus has the GUI property AlignStyle. Clicking on the value and pulling down the menu (there is an arrow on the left) shows the possible values, in this case Horizontal and Vertical. By choosing one value and selecting Enter, the bus alignment change is applied. Another property is Source File which is the name of the file where the selected object was created. If such a file is opened in the GUI, then clicking the object will indicate in the file the line of code where that object was created.

Software Architecture Viewer

The Software Architecture Viewer (FIGURE 7-5) gives a graphical representation of the software architecture and consists of two tabs. The viewer opens showing the OS view tab, with information of threads, processes, and processors. FIGURE 7-5 shows the OS View.

FIGURE 7-5 PacketClassifier Software Architecture - OS View

A second tab, the Late-Binding View (FIGURE 7-6) shows the information of threads, mutexes, channels, queues, and memory pools. When a validation is available, that is, the project was created through a configuration file, the processors displayed in the OS View are actually created in the hardware architecture. The processors are checked for a mismatch in the hardware architecture, and in case of error, the processors display a cross to highlight the problem. The outline and properties views are the same as the ones described for the hardware architecture (Hardware Architecture Viewer.)

FIGURE 7-6 PacketClassifier Software Architecture - Late-Binding View

Mapping Viewer

The Mapping Viewer (FIGURE 7-7) shows which functions are mapped on which threads and which variables are mapped on which memory banks. In the Type combo box, select an element among Function, Memory Bank, Thread, and Variable.

The Mapping table displays a list of all the elements chosen in the combo. Selecting an element in the Mapping table causes all the elements mapped to it to be shown in the right-side list. For example, if you choose Function, the left side of the Mapping table shows you all the functions that are defined in the application code. When one function is selected, the names of the threads that have that function as an entry point function are shown on the right side of the table.

FIGURE 7-7 PacketClassifier Mapping

You can set the Mapping Viewer in one of two modes:


Build

It is possible to compile the Teja application in the Eclipse-based ADE.


procedure icon  To Compile the Teja Application in the Eclipse-Based ADE

1. Create the target All.

2. Select the project name in the navigator tab and right click on Create Make Target.

3. Type in the Target Name and Make Target fields. Click Create.

4. To compile, select the project name again and right-click Build Make Target.

5. Choose All and click Build.

In the Console tab, the compiler output and warnings or errors, if any, are shown.