Creating Project Using New Bareboard 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.

    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 launches.

  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. Enter the name of the project in the Project name text box. For example, type in S12Z_Project.
  5. Click Next.

    The Devices page appears.

  6. Select the desired CPU derivative for the project.
  7. Click Next.

    The Connections page appears.

  8. Select the connection(s) appropriate for your project.
  9. Click Next.

    The Language and Build Tools Options page appears.

  10. Select the options appropriate for your project.
  11. Click Next.

    The Rapid Application Development page appears.

  12. Select the options appropriate for your project.
  13. Click Finish.
    Note: For detailed descriptions of the options available in the New Bareboard Project wizard pages, refer to the Microcontrollers V10.x Targeting Manual.

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 S12Z_Project project appears in the CodeWarrior Projects view in the Workbench window.

By default, the project is not built. To do so, select Project > Build Project from the IDE menu bar. Expand the S12Z_Project tree control in the CodeWarrior Projects view to display 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
CodeWarrior Projects View

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

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

The CodeWarrior compiler allows you to compile the C-source code files separately, simultaneously, or in other combinations.

Examine the project folder that the IDE generates when you create the project. To do this, right-click on the project's name (S12Z_Project : FLASH) in the CodeWarrior Projects view, and select Show In Windows Explorer. The workspace folder containing the project folder, S12Z_Project appears.

Figure 2. Contents of S12Z_Project Directory
Contents of S12Z_Project Directory

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

Note: The files (.project, .cproject) store critical information about the project's state. The CodeWarrior Projects view does not display these files, but they should not be deleted.