• FlexLM license manager
• Luminosity
• LynxOS cdk
• LynxOS ode
9.2.2 Getting Started
The first step is to install the FlexLM license manager and have it retrieve a host ID number. This turns out to be the MAC address of your eth0 port. Send that to LynuxWorks and they will send back a license file with limited-time licenses for both Luminosity and LynxOS. Before starting Luminosity, you must start the FlexLM daemon.
Actually, you can run Luminosity without a license, in which case it simply reverts to standard Eclipse 3.2. Figure 9.1 is the initial perspective for Luminosity. There are several additional icons in the tool bar, most of which represent items in the LynuxWorks menu. Note also a set of shortcuts for selecting perspectives.
Figure 9.1: Luminosity initial perspective.
In order to create and run embedded projects with Luminosity, you must register a cross-development platform (Figure 9.2). In this case it’s LynxOS for the x86.
Figure 9.2: Register a cross-development platform.
Luminosity offers several LynuxWorks-specific project types, as shown in Figure 9.3. A LynuxWorks C project gives you complete control over the Makefile. Luminosity generates a template Makefile that you are allowed to edit. By contrast, the Managed Make project generates a makefile that you’re not supposed to edit. The same distinction is true of Device Driver and Managed Device Driver projects. The Kernel project builds a LynxOS bootable kernel image.
Figure 9.3: New Project dialog and wizard selection.
Having selected and named a LynuxWorks C project, clicking Next a couple of times brings up the Project Code Generator dialog, shown in Figure 9.4. Here you have the choice of creating an empty project, a Hello World project, or one of several sample projects that illustrate various operational features of LynxOS.
Figure 9.4: Code Generator dialog.
Clicking Finish creates the project and brings up the LW C/C++ perspective. This is very much like the standard C/C++ perspective with the addition of a LW C/C++ Projects view and a LW Make Targets view. The Projects view is similar to the standard Navigator view with a slightly different look. LW Make Targets seems to take the place of the standard Make Targets view.
9.2.3 Debugging With Luminosity
LynuxWorks doesn’t support any kind of simulator for LynxOS, so you need a real target running LynxOS in order to test code. That’s the bad news. The good news is that just about any old 486 box you have lying around as a doorstop should work as a target. There is a tool to build a bootable CD with a LynxOS kernel image.
Luminosity uses a proprietary method for managing remote targets. Select LynuxWorks→Set Remote Target to bring up the Targets view, which is initially empty. Right-click in the Targets view and select New Target. This brings up the dialog of Figure 9.5. The Connection tab is fairly self-explanatory. Once you enter the parameters, the Validate button will attempt to resolve the target IP address and then check all connection types that Luminosity uses.
Figure 9.5: Remote Target Configuration.
The Authentication tab lets you enter a user name and password, and a directory on the target where application binaries will be downloaded. The Utilities tab sets network protocol parameters and can usually be left at default values. If you only define one target, it becomes the default.
Luminosity defines its own launch configuration for LynuxWorks C/C++ projects. The only tab that differs from the standard C/C++ Local Application launch configuration is the Debugger tab (Figure 9.6). This sets parameters for remote debugging on the default target.
Figure 9.6: Launch configuration debugger tab.
Basic debugging is essentially the same as in standard Eclipse. LynuxWorks does add a couple of its own interesting debug features.
There are times when you don’t really want to, or can’t, stop the program at the breakpoint, but you would like to monitor its behavior by watching the value of selected variables. Tracepoints are set in the program in much the same way as are breakpoints. When program execution encounters a tracepoint, any variables or expressions attached to it are evaluated and saved. Later, when the program is stopped, you can review the saved data.
Two new views are associated with tracepoints: Tracepoints and Trace Data. The Tracepoints view is where you define and configure tracepoints. Figure 9.7 shows the Tracepoint properties dialog where you can add expressions to be monitored.
Figure 9.7: Tracepoint properties.
The Trace Data view displays collected trace data when the program is stopped. It provides menu items to start and stop tracing, scroll through the collected data, and save the data to a file.
Luminosity can display information about POSIX inter-process communication mechanisms being used by the application being debugged. This information is contained in a set of views representing each of the IPC mechanisms:
• Semaphores
• Mutexes
• Conditional variables
• Message queues
Figure 9.8: Message Queues view.
9.3 MontaVista — DevRocket
MontaVista offers both an Application Development Kit (ADK) and a Platform Development Kit (PDK). The latter is intended for doing Linux kernel development and building board support packages (BSPs). The former is intended for application development and leaves out the features that support kernel and BSP development. Both packages are based on the company’s DevRocket IDE, which in turn is built on Eclipse.
9.3.1 Getting the Evaluation
For purposes of this book, I tested an on-line demo of DevRocket that includes a simulation of a Power PC target board. MontaVista’s website includes an “Evaluation Center,” accessed from the Products and Services tab of the main page. From there you can fill out a form to request access to the online demo. You should then receive an email with a link to the demo, a user ID, and a password. Access is time-limited. In my case it was about two weeks.
ADK version 5.0 includes:
• Eclipse version 3.2
• CDT version 3.1
• Remote System Explorer 1.0
• GNU cross tool chain for a specific architecture, based on GCC 4.2
• Analysis and optimization tools:
○ Application pre-linking
○ Library optimization
○ Memory leak detection
○ Memory usage analysis
○ Application profiling
○ Linux Trace Toolkit: in PDK only
• Linux kernel version 2.6.18
• “Virtual target” based on VMware for testing without actual target hardware
9.3.2 Getting Started
After obtaining a user ID and password from MontaVista, you are directed to a specific web page from where you can start the simulation. This brings up a Gnome graphical desktop, as shown in Figure 9.9.