Книга: Embedded Linux development using Eclipse

3.4.7 Run Menu

3.4.7 Run Menu

Having built a project, the next thing we probably want to do is run or debug it. Eclipse runs projects from a launch configuration that specifies the program to run, its arguments and environment, and how the program connects to Eclipse (i.e., is it a local process or is it running remotely on a target board of some sort?). A launch configuration also specifies the debugger and how it connects to Eclipse.

Before we run or debug a project, we must first create a launch configuration. Click on Run?Run Configurations…. Click the New button, the one farthest to the left in the left-hand panel, to create a new configuration under “C/C++ Local Application.” This brings up the dialog shown in Figure 3.16.


Figure 3.16: Launch configuration dialog.

The configuration name has been automatically set to match the project name.

You need to select an application to run by clicking Search Project… and then selecting /hello/Release/hello. Click the other tabs just to see what’s there. The hello program takes no arguments and has no environment variables. We’ll look at the Debugger tab in the next chapter.

Now click Apply and then click Run. The program output appears in the Console view. With at least one launch configuration established, the other Run menu actions become meaningful:

• Run: Rerun the most recent launch in Run mode.

• Run History: Presents a submenu of configurations launched in Run mode. Currently there’s only one.

• Run As: Presents a submenu with one item: “Local C/C++ Application.” Clicking that brings up a dialog where you can select either the release or debug binary to run.

• Debug: Rerun the most recent launch in Debug mode.

• Debug History: Presents a submenu of configurations launched in Run mode. Currently there’s only one.

• Debug As: Presents a submenu with one item: “Local C/C++ Application.” Clicking that brings up a dialog where you can select either the release or debug binary to run.

• Debug Configurations…: Opens the launch configuration dialog for debug mode configurations. The hello configuration we created for run mode is selected and can be used as-is. We’ll explore debugging in the next chapter.

The Run menu also includes a number of execution control actions that are used for debugging.

Оглавление книги


Генерация: 1.372. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз