4.4.4. Creating a Real Time Process (RTP) Project on Wind River Workbench 4.x

Creating an RTP project for Ada development is easy with the Wind River wizard and GNATbench project converter.

4.4.4.1. Preparing a source build or image project

Prior to be able to create a Real-Time Process (RTP) project, you need to have available a Kernel Image project or a pre-built VSB project.

To create them, see menu “File” > “New” > “Wind River Workbench Project...” and “Build type:” equal to Source Build and Kernel Image

4.4.4.2. Creating and Configuring the Project

The first step is to invoke the wizard. In the System Development perspective, use the menu bar and select “File”, then “New”, and finally “Wind River Workbench Project...”.

The Workbench wizard will open so that you can choose “Real Time Process Application” build type. (see figure below).

new project wizard RTP build type page

Click “Next >” button.

Another wizard page will appear, allowing you to select the project name and location.

new project wizard RTP project name page

Enter the name of the new project (we used “test”, arbitrarily) Typically this location will be the workspace so you can take the default, but otherwise take one of the other choices as appropriate. Press Next.

Another wizard page will appear, allowing you to configure the project context.

new project wizard RTP project context page

Select the project (image project or source build) to be used as base project.

You can now press Finish.

If the current Active Build Spec (see menu “Project” > “Build” > “Set Active Build Spec...”) of your new project is not a GNU spec, change the active build spec.

You may be asked to rebuild the C/C++ index. (see below) Press “Yes” to rebuild. You can rebuild index later running the menu “Project” > “C/C++ Index” > “Rebuild”.

rebuild C/C++ index

Delete the rtp.c file to avoid “multiple definition of `main’” build error.

The new project is now ready to be converted to support Ada language, you should see it in the Project Explorer, like so:

new rtp project before conversion

4.4.4.3. Extending the Project for Ada and GNATbench

Finally, you must extend the new project to support Ada via GNATbench. This step is essential. This step must be performed before any functionality for Ada builds, language-sensitive editing, et cetera is invoked. See Extending Existing Wind River Workbench Projects for Ada for the extension process.

In the extension wizard you will likely want to select the option “Create a new GNAT project file”. This option will walk you through the steps of defining a new project, including source and object folders and so forth, and will create everything you specify.

Once the project is converted to a GNATbench project it is ready for use. All the previous Wind River Workbench functionality is still available, and all the additional Ada functionality has been integrated.

Note the file containing the main subprogram. This file will have the name we specified, “test_rtp.adb”, and will contain a procedure with that unit name:

rtp main subprogram in editor

In a real application we would alter the content of the main subprogram. It is a buildable subprogram, though, without any changes.

4.4.4.4. Building the Project

To build the project, select it in the “Project Explorer” view and run on of the following menus.

  • “Project” > “Build Project” from main menu bar.
  • “Build Project” or “Rebuild Project” from project’s contextual menu.

You may be asked to generate the include search paths. (See below)

Click “Continue” to build your new Real Time Process (RTP) containing ada code.

set include search path