4.4.3. Creating a Downloadable Kernel Module (DKM) Project on Wind River Workbench 4.x

Creating a DKM project for Ada development is easy with the Wind River wizard and GNATbench project converter. Preparing a source build or image project

Prior to be able to create a Downloadable Kernel Module (DKM) 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 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 “Downloadable Kernel Module” build type. (see figure below).

new project wizard DKM build type page

Click “Next >” button.

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

new project wizard DKM project name page

Enter the name of the new project (we used “test_dkm”, 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 configure the project context.

new project wizard DKM 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

The new project is now ready to be converted to support Ada language, you should 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. 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 Downloadable Kernel Module (DKM) with Ada sources.

set include search path