Using the Wizard

This example creates a simple demonstration project using C source code. This step-by-step procedure requires only a few minutes to complete.

  1. From the Windows Start menu, select 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. If you want to use the default directory, click OK . Otherwise, click the Browse button to open the Select Workspace Directory dialog box, navigate to the desired directory, and click OK . Click OK again to start using the workspace.

    The IDE launches and displays the CodeWarrior Welcome page.

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

    The Create an MCU Bareboard Project page appears.

  4. Type the name of the project in the Project name text box. For example, type in cortex-m4_project. Click Next .

    The Devices page appears, and displays the supported MCUs.

  5. Expand the Kinetis family tree control and select the desired CPU derivative. For example, select Kinetis K Series > K1x Family > K10D (100MHz) Family > MK10DN512Z .
  6. Click Next .

    The Connections page appears.

  7. Select the connection(s) appropriate for your project. By default, the P&E USB MultiLink Universal [FX] / USB MultiLink option is selected.
  8. Click Next .

    The Language and Build Tools Options page appears.

  9. Select the appropriate option for your project.
  10. Click Next .

    The Rapid Application Development page appears.

  11. Select the options appropriate for your project.
  12. Click Finish.

The Wizard automatically generates the startup and initialization files for the specific MCU derivative, and assigns the entry point into your ANSI-C project (the main() function). An item titled cortex-m4_Project appears in the CodeWarrior Projects view of the IDE.

Note: For detailed descriptions of the options available on the MCU 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 cortex-m4_Project tree control, to display the supporting directories and files in the CodeWarrior Projects view.

Figure 1. CodeWarrior Projects View - Expanded Project
CodeWarrior Projects View - Expanded Project

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 default groups and files displayed in the project window.

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

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 .

To build the project manually, select Project > Build Project .

Examine the project folder that the IDE generated when you created the project. To do this, right-click on the project's name ( cortex-m4_project : RAM) in the CodeWarrior Projects view, and select Show In Windows Explorer from the context menu. Windows displays the Eclipse workspace folder, along with the cortex-m4_project folder within it.

The following figure displays 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 it is best that you know their locations and functions.

Figure 2. Contents of the cortex-m4_project directory
Contents of the cortex-m4_project directory
Note: The files (.project, .cproject) store critical information about the project's state. The CodeWarrior Projects view does not display these files, and they should not be deleted.