Configuring the Compiler

Build tools use a tool directory for configuring and locating their generated files. For the Microcontrollers V10.x build tools, the tool directory is the prog folder, and is located in the <CWInstallDir>\MCU folder, where CWInstallDir is the directory in which the CodeWarrior software is installed.

Build tools require information from the configuration files. There are two types of configuration data:

To configure the Compiler, proceed as follows:

  1. Double-click chc08.exe file, which is located in the <CWInstallDir>\MCU\prog folder.

    The HC08 Compiler window appears.

    Figure 1. HC08 Compiler Window

    HC08 Compiler Window

  2. Read the tips, if you want to, and click Close.

    The Tip of the Day dialog box closes.

  3. Select File > New > Default Configuration from the HC08 Compiler menu bar.
    Note: You can also use an existing configuration file. Select File > Load Configuration to open the existing configuration file.
  4. Select File > Save Configuration (or Save Configuration As ) from the HC08 Compiler menu bar.

    The Saving Configuration as dialog box appears.

  5. Browse and select the folder where you want to save the configuration. In this example, folder X15 is used to save the configuration.
    Figure 2. Saving Configuration as Dialog Box

    Saving Configuration as Dialog Box

  6. Click Save.

    The folder becomes the project directory. The project directory folder is often referred as current directory.

    Figure 3. Compiler's Current Directory Switches to your Project Directory

    Compiler's Current Directory Switches to your Project Directory

    The project directory folder now contains the newly-created project.ini configuration file. The project configuration file contains a copy of the [CHC08_Compiler] section of the project.ini file located in the prog folder. If a build tool modifies any project option, the changes are specified in appropriate section of the project configuration file.

    Note: Option changes made to the project.ini file in the prog folder apply to all projects. Recall that this file stores the global tool options.
  7. Select Compiler > Options > Options from the HC08 Compiler menu bar.

    The HC08 Compiler Option Settings dialog box appears.

    Figure 4. HC08 Compiler Option Settings Dialog Box

    HC08 Compiler Option Settings Dialog Box

  8. Select the Output tab.
  9. Check the Generate Listing File checkbox.
  10. Check the Object File Format checkbox and select ELF/DWARF 2.0 from the drop-down list that appears for the Object File Format checkbox.
  11. Click OK.

    The HC08 Compiler Option Settings dialog box closes.

  12. Save the changes to the configuration by either:
    • selecting File > Save Configuration (Ctrl + S ), or
    • clicking Save on the toolbar.

The compiler is configured.

Note: For more information about configuring the Compiler options, refer to the Graphical User Interface chapter.