4.4.1. Creating a Downloadable Kernel Module (DKM) Project on Wind River Workbench 3.x

Creating a DKM project for Ada development is easy with the Wind River wizard and GNATbench project converter. Disabling Standard Managed Builds

As of Wind River Workbench 3.0, “Flexible” managed builds are used by default and “Standard” managed builds are deprecated. New GNATbench projects must employ Flexible managed builds.

Therefore, set the options on the Wind River “Build” preference page as shown below to disable Standard managed builds. You must also ensure the option to “Create default build targets for new projects using flexible managed build” remains enabled.

enabling standard build pref page Creating and Configuring the Project

The first step is to invoke the wizard. In the Application Development perspective, use the menu bar and select “File”, then “New”, and then the list of project types will be displayed in the menu, as shown in the following figure:

new project menu

We want the DKM project creation wizard so we click on the wizard named “VxWorks Downloadable Kernel Module Project”.

The Workbench wizard will open so that you can configure the new DKM project (see figure below).

new DKM project wizard project name page

Enter the name of the new project (we used “test”, again arbitrarily) and choose to have the new project files reside in the default workspace location. Press Next.

Another wizard page will appear, allowing you to select the builder characteristics. You should choose the default “Flexible” build mechanism. Ordinarily the option to use “Standard” managed builds for a new project should be disabled. Press Next.

new DKM project wizard build setup

The next page (below) allows you to configure the build command and how the result is processed. Take all the defaults and press Next.

new DKM project wizard build support

The next page (below) allows you to configure the build spec for the project. We first press “Deselect All” because we only want one build spec for this tutorial because we only have one type of board available. Then we selected “PPC604gnu” because we have a PPC board and GNAT is a GNU compiler. *Be sure to select the GNU version of any given build spec.*

new DKM project wizard build spec

The next page (below) allows you to configure a build target name and tool for the project. Take all the defaults and press Next.

new DKM project wizard build target

The next page (below) allows you to configure the source code indexer for the project. This is a C++ tool so it is not pertinent to GNATbench projects. You can either take all the defaults and press Next, or disable the indexer altogether. It will not cause difficulties later if you choose to take the defaults. In the figure below we show how to disable the indexer.

new DKM project wizard indexer

You can now press Finish. The new project will be created and you will see it in the Project Explorer, like so:

created project in Project Explorer 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.