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 Microcontrollers V10.x 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. Specify a name for the new project. For example, enter the project name as Project1.
  5. Click Next.

    The Devices page displaying the supported Microcontrollers appears.

  6. Select the desired CPU derivative for the project. For this example, select RS08> RS08KA Family> MC9RS08KA1.
    Note: Based on the derivative selected in the Devices page, the step numbering in the page title varies.
  7. Click Next.

    The Connections page appears.

  8. 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.
  9. Click Next.

    The Languages page appears.

  10. From the Languages options, check C. (This is the default setting).
    Note: To enable the Absolute Assembly checkbox, clear the 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.
  11. Click Next.

    The Rapid Application Development page appears.

  12. Select the appropriate rapid application development tool.
  13. Click Next.

    The C/C++ Options page appears.

  14. Select Small memory model for memory model, Nonefor the floating-point numbers format, and ANSI startup code for the level of startup code.
    Note: These three are the default selections and are the routine entries for an ANSI-C project. Floating point numbers impose a severe performance penalty, so use the integer number format whenever possible.
    Note: If you intend to use the flexible type management option ( -T), choose minimal startup code instead of ANSI startup code. The ANSI C-compliant startup code does not support 8-bit int.
  15. Click Finish.

The Project1 project appears in the CodeWarrior Projects view in the Workbench window.

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

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 Project1 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 Project1
CodeWarrior Projects View - Displaying Project1
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 Project1 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 on the project's name ( Project1 : FLASH) in the CodeWarriorProjects view, and select Show In Windows Explorer . Windows displays the Eclipse workspace folder, along with the project folder, Project1, within it, as the following image shows:

Figure 2. Contents of Project1 Directory
Contents of Project1 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.

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