Analysis of Files in the CodeWarrior Projects View

Expand the groups by clicking your mouse in the CodeWarrior Projects view to display all the default files generated by the MCU Wizard.

The wizard generated three C source code files, visible in the project window from their respective folders:

At this time, the project should be configured correctly and the source code free of syntactical errors. If IDE built the project automatically, you should see a link to the project's binary files, and the RAM folder present in the CodeWarrior Projects view. To understand what the IDE does, clean the project and then force a manual build. Proceed as follows:

  1. Select Project > Clean.

    The Clean dialog box appears.

    Figure 1. Clean Dialog Box

    Clean Dialog Box

  2. Select the Clean all projects option and clear the Start a build immediately option. Click OK .
  3. The Binaries link disappears, and the RAM folder is deleted.
  4. Select Project > Build Project from the IDE menu bar.

    The Console window displays the statements that direct the build tools to compile and link the project. The Binaries link appears, and so does the RAM folder.

During a project build, the C source code is compiled, the object files are linked together, and the CPU derivative's ROM and RAM area are allocated by the linker according to the settings in the linker command file. When the build is complete, the RAM folder contains the cortex-m4_project.elf file.

The Linker Map file ( cortex-m4_project.map) file indicates the memory areas allocated for the program and contains other useful information.

To examine the source file, main.c, double click on the main.c file in the Sources group. The IDE editor opens the default main.c file in the Editor view.

Figure 2. Default main.c File

Default main.c File

Use the integrated editor to write your C source files ( *.c and *.h) and add them to your project. During development, you can test your source code by building and simulating/debugging your application.