3.2.3. Configuring the project build targets

This section describes how to configure your example project so that the example dhryansi files compile, and the project build settings are the same as those in the supplied dhryansi example project. It describes one way of selecting build targets, and shows how different build target settings can be used in the same project. See the CodeWarrior IDE Guide for a complete description of build targets.

Build target settings must be selected separately for each build target in your project. To set build target options for the dhryansi example:

  1. Ensure that the DebugRel build target is currently selected. By default, the DebugRel build target is selected when you create a new project based on the ARM project stationery. The currently selected build target is displayed in the Build Target drop-down list in the project toolbar (Figure 3.8).

    Figure 3.8. Currently selected build target

  2. Select DebugRel Settings… from the Edit menu. The name of this menu item changes depending on the name of the currently selected build target. The CodeWarrior IDE displays the DebugRel Target Settings panel (Figure 3.9). All the target-specific settings are accessible through configuration panels listed at the left of the panel.

    Note

    Many configuration options are optional. However you must review the target settings for each build target in your project to ensure that they are appropriate for your target hardware, and your development requirements. See CodeWarrior IDE Guide for configuration recommendations.

    Figure 3.9. DebugRel Settings

    DebugRel Settings
  3. Click the ARM C Compiler entry in the Target Settings Panels list to display the configuration panel for the C compilers. The Target and Source panel is displayed (Figure 3.10). The panel consists of a number of tabbed panes containing groups of configuration options. For this example, the dhryansi source requires that you set a predefined macro before it will compile.

    Figure 3.10. ARM C compiler panel

    ARM C compiler panel
  4. Click the Preprocessor tab to display a list of predefined macros (Figure 3.11).

    Figure 3.11. ARM C compiler preprocessor panel

    ARM C compiler preprocessor panel
  5. Type MSC_CLOCK into the text field beneath the List of #DEFINES and click Add to define the MSC_CLOCK macro. The CodeWarrior IDE adds MSC_CLOCK to the List of #DEFINES. The Equivalent Command Line text box displays the compiler command-line option required to define MSC_CLOCK (Figure 3.12).

    Figure 3.12. MSC_CLOCK defined

    MSC_CLOCK defined
  6. Click Apply to apply your changes, and close the DebugRel Settings panel.

At this point you have defined the MSC_CLOCK macro for the DebugRel build target only. You must also define the MSC_CLOCK macro for the Release and Debug build targets if you want to use them. To select the Release build target:

  1. Ensure that the Project window is currently active.

  2. Click the Current Target drop-down list to display the list of defined build targets (see Figure 3.8).

  3. Select Release from the list of build targets to change the current build target.

  4. Apply the steps you followed above to define MSC_CLOCK the Release build target.

    Note

    You can also cut and paste build target settings into the Equivalent Command Line text box. Press the Enter key to set the options and update the panel controls. Be careful not to copy command-line options that are inappropriate, such as the optimization and debug settings, from one build target to another.

    Leave the Release Target settings panel open after you have saved your changes.

  5. Click on the Debug/Opt tab to display Debug and Optimization options for the Release build target (Figure 3.13).

    Figure 3.13. Debug/Opt configuration panel

    Debug/Opt configuration panel
  6. Select the For time Optimization Criterion button. The Equivalent Command Line text box reflects the change.

  7. Click Apply to apply your settings.

  8. Define MSC_CLOCK in the Debug build target in the same way as you have for the DebugRel and Release build targets.

    Your project is now equivalent to the dhryansi example project supplied with the ARM Developer Suite.

Note

This example has shown how to use the configuration dialogs to set options for individual build targets. There are configuration panels available for most of the ADS toolchain, including the linker, fromELF, and the assembler. You can use the configuration panels to specify most options available in the tools, including:

  • procedure call options

  • the structure of output images

  • the linker and postlinker to use

  • the ARM debugger to call from the CodeWarrior IDE.

See the section on configuring a build target in the CodeWarrior IDE Guide for a complete description of build target options.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0064D
Non-Confidential