Creating Project using CodeWarrior Project Wizard

The steps below create an example Microcontrollers project that uses C language for its source code.

  1. Select Start > Programs > Freescale CodeWarrior > CW for MCU v10.x > CodeWarrior from the Windows® Taskbar.

    The Workspace Launcher dialog box appears. The dialog box displays the default workspace directory. For this example, the default workspace is workspace_MCU.

  2. Click OK to accept the default location. To use a workspace different from the default, click Browse and specify the desired workspace.

    The CodeWarrior IDE for Microcontrollers V10.x appears.

  3. Select File > New > Bareboard Project from the IDE menu bar.

    The Create an MCU Bareboard Project page of the New Bareboard Project wizard appears.

  4. Type the name of the project in the Project name text box. For this example, type HCS08_project. Click Next.

    The Devices page displaying the supported Microcontrollers appears.

  5. Select the desired CPU derivative for the project. For this example, select S08 > HCS08G Family > MC9S08GT32.
    Note: Based on the derivative selected in the Devices page, the step numbering in the page title varies.
  6. Click Next.

    The Connections page appears.

  7. Check the option(s) to specify the hardware probe that you want to use to connect the workstation to the hardware target. By default, only the P&E USB Multilink Universal [FX] / USB Multilink is selected.
  8. Click Next.

    The Languages page appears.

  9. Select the programming language options you want to use. For this example, check the C checkbox.
    Note: To enable the Absolute Assembly checkbox, clear the C , C++ , and Relocatable Assembly checkboxes. This is because you cannot mix the absolute and relocatable assembly code in a program. Since the C and C++ compilers generate relocatable assembly, they must be cleared to allow the use of absolute assembly.
  10. Click Next.

    The Rapid Application Development page appears.

  11. Select the appropriate rapid application development options.
  12. Click Next.

    The C/C++ Options page appears.

    Note: As this project uses the C programming language, Small, None and ANSI startup code options are selected by default for the memory model, the floating point supported and the level of startup code, respectively.
  13. Select the options appropriate for your project.
  14. Click Finish.

    The wizard automatically generates the startup and initialization files for the specific microcontroller derivative, and assigns the entry point into your ANSI-C project (the main() function). The HCS08_project project appears in the CodeWarrior Projects view in the Workbench window.

    Note: For detailed descriptions of the options available in the New Bareboard Project wizard pages, refer to the Microcontrollers V10.x Targeting Manual.

    By default, the project is not built. To do so, select Project > Build Project from the IDE menu bar. Expand the HCS08_project : FLASH tree control in the CodeWarrior Projects view to view its supporting directories and files.

    Note: To configure the IDE, so that it automatically builds the project when a project is created, select Window > Preferences to open the Preferences window. Expand the General node and select Workspace. In the Workspace panel, check the Build automatically checkbox and click OK.
    Figure 1. CodeWarrior Projects View - Displaying HCS08_project

    CodeWarrior Projects View - Displaying HCS08_project

    Note: The contents of the project directory vary depending upon the options selected while creating the project.

The view displays the logical arrangement of the files in the HCS08_project project directory. At this stage, you can safely close the project and reopen it later, if desired.

The following is the list of default groups and files displayed in the CodeWarrior Projects view.

Examine the project folder that the IDE generates when you create the project. To do so, right-click the project's name ( HCS08_project : FLASH) in the CodeWarrior Projects view, and select Show In Windows Explorer. Windows displays the Eclipse workspace folder, along with the project folder, HCS08_project, within it.

These are the actual folders and files generated for your project. When working with the standalone tools, you may need to specify the paths to these files, so you should know their locations.

There are some files, .project, .cproject, and .cwGeneratedFilesetLog, that store critical information about the project's state. The CodeWarrior Projects view does not display these files, but they should not be deleted.