The steps below create an example Microcontrollers project that uses C language for its source code.
- 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.
- 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.
- Select File > New > Bareboard Project from the IDE menu bar.
The
Create an MCU Bareboard Project
page of the
New Bareboard Project
wizard appears.
- Specify a name for the new project. For example, enter the project name as Project1.
- Click Next.
The
Devices
page displaying the supported Microcontrollers appears.
- 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.
- Click Next.
The
Connections
page appears.
- 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.
- Click Next.
The
Languages
page appears.
- 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.
- Click Next.
The
Rapid Application Development
page appears.
- Select the appropriate rapid application development tool.
- Click Next.
The
C/C++ Options
page appears.
- 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.
- 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
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.
- Binaries is a link to the generated binary ( .abs) files.
- FLASH is the directory that contains all of the files used to build the application for Project1. This includes the source, header, generated binary files, the makefiles that manage the build process, and the build settings.
- Lib is the directory that contains a C source code file that describes the chosen MCU derivative's registers and the symbols used to access them.
- Project_Headers is the directory that contains any Microcontrollers-specific header files.
- Project_Settings group contains the Debugger folder, Linker_Files folder and the Startup_Code folder. The Debugger folder contains any initialization and memory configuration files that prepare the hardware target for debugging. It also stores the launch configuration used for the debugging session. The Linker_Files folder stores the linker command file ( .prm) and the burner command file ( .bbl). The Startup_Code folder has a C file that initializes the Microcontrollers stack and critical registers when the program launches.
- Sources contains the source code files for the project. For this example, the wizard has created only main.c, which contains the main() function.
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 
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.