The steps below creates 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 CodeWarrior IDE 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.
- Enter the name of the project in the Project name text box. For example, type in CF_project.
- Click Next.
The
Devices
page appears.
- Select the desired CPU derivative for the project.
- Click Next.
The
Connections
page appears.
- Select the connection(s) appropriate for your project.
- Click Next.
The
ColdFire Build Options
page appears.
- Select the options appropriate for your project.
- Click Next.
The
Rapid Application Development
page appears.
- Select the options appropriate for your project.
- Click Finish.
Note: For the 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
CF_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
CF_Project tree control in the
CodeWarrior Projects
view to display its supporting directories and files. Refer the following figure.
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. CF_project Project in 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.
- Binaries is a link to the generated binary ( .elf) files.
- FLASH is the directory that contains all of the files used to build the application for CF_project. This includes the source, lib, 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 MCU-specific header files.
- Project_Settings group consists of the following folders:
- Debugger: Consists of any initialization and memory configuration files that prepare the hardware target for debugging. It also stores the launch configuration used for the debugging session.
- Linker_Files: Stores the linker command file ( .lcf).
- Startup_Code: Contains a C file that initializes the MCU's stack and critical registers when the program launches.
- Sources contains the source code files for the project. For this example, the wizard has created main.c file that contains the main() function, and an exceptions.c file that contains the generic exeptions for ColdFire processors.
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 (
CF_project : FLASH) in the
CodeWarrior Projects
view, and select
Show In Windows Explorer
. The workspace folder containing the project folder,
CF_project appears.
Figure 2. Contents of CF_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.