12.4.4. Adding files to a user-defined project

You can add files to the active project from the:

If the Project Properties window is visible, selecting an option from the Project menu might display an error dialog box instructing you to use the window to make the update. You must also wait for any build process to complete before trying to add files to the active project.

Adding files using the Project menu

With a project open, you can add source files to the project and so update the project properties automatically:

  1. Choose the menu option according to the location of the file you want to add:

    • Select Project → Add This File to Project to add the file currently displayed in the File Editor pane to the list of sources specified for the project.

    • Select Project → Add Files to Project... to display the Select File(s) to Add dialog box where one or more files can be located and added to the project.

    The relative pathname of the file is added to the Sources group in the top-level COMPILE or ASSEMBLE group. If this is the first update to the Sources group, an asterisk is appended to the beginning of the group name.

    The Project Properties window is not displayed, but you can view the change by opening the window as described in Project properties.

    If your project has more than one COMPILE or ASSEMBLE group enabled, a list selection box, is displayed that lists the groups for the type of file being added:

    • for files with extension .c, .cpp, .cc, or .cxx, the list shows enabled COMPILE groups

    • for files with extension .s, .src, or .asm, the list shows enabled ASSEMBLE groups.

    Figure 12.3 shows the COMPILE groups for the example dhrystone project.

    Figure 12.3. Add project source file selection box

    Add project source file selection box
  2. Choose the required group, for example COMPILE=arm and, then click OK to close the dialog box.

    The Build tab shows the makefile being regenerated.

  3. When the makefile has been regenerated, select Tools → Build..., to rebuild the image.

Note

If you select files of different types, for example, *.c and *.s files, then RealView Debugger adds the files to the appropriate group, even if that group is disabled. In this example, the *.c files are added to the COMPILE=arm group, and the *.s files are added to the ASSEMBLE=arm group.

Adding files using the Project Properties window

For examples of adding files using the Project Properties window, see:

Also, see Specifying paths to include files if you have project-specific include files in a different directory from your main source files.

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0234B
Non-Confidential