3.2.2. Adding source files to the project

Projects created from ARM project stationery do not contain source files. This section describes how to add the source files from the dhryansi example.

To add source files to a project:

  1. Ensure that the project window is the active window.

  2. Select Add Files… from the Project menu. A Select files to add… dialog is displayed.

  3. Navigate to the dhryansi directory in the install_directory\Examples directory and Shift-click on dhry_1.c and dhry_2.c to select them (Figure 3.4).

    Figure 3.4. Select files to add… dialog

    Select files to add… dialog
  4. Click Open. The CodeWarrior IDE displays an Add Files dialog (Figure 3.5). The dialog contains a checkbox for each build target defined in the current project. In this example, the dialog contains three checkboxes corresponding to the three build targets defined in the ARM Executable Image project stationery.

    Figure 3.5. Add Files

    Add Files
  5. Leave all the build target checkboxes selected and click OK. The CodeWarrior IDE adds the source files to each target in the project and displays a Project Messages window to inform you that the directory containing the source files has been added to the access paths for each build target (Figure 3.6).

    Figure 3.6. Project messages window

    Project messages window

    The access paths for each build target define the directories that are searched for source and header files. See the CodeWarrior IDE Guide for details.

    Note

    You do not need to add the header files for the dhryansi project because the CodeWarrior IDE locates them in the newly added access path. However, you can add header files explicitly if you want.

  6. Ensure that the Files tab is selected in the project window. The project window displays all the source files in the project. (Figure 3.7). See the CodeWarrior IDE Guidefor more information on what is displayed when you click the Link Order tab and the Targets tab.

    Figure 3.7. Source files in Files view

    Source files in Files view
Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0064D
Non-Confidential