Include Profiler Library and Files

The profiling code that keeps track of the time spent in a routine exists in a series of libraries. You need to add a profiler library and four profiler files to your project to use the profiler.

To add the profiler files:

  1. Select the Sources folder of your project in the CodeWarrior Projects view.
  2. Right-click and select the Add Files option.

    The Open dialog box appears.

  3. Browse to the <CodeWarrior_Installation_Folder>\MCU\ColdFire_Support\Profiler\Support\ location.
  4. Select timer.c and timer_5485.c with Ctrl key pressed and click Open.

    The File and Folder Import dialog box appears.

  5. Select the Copy the files and directories option and click OK.

    The files are added to the Sources folder.

    Figure 1. Profiler Files Added to Sources Folder
    Profiler Files Added to Sources Folder
  6. Select the Project_Headers folder of your project in the CodeWarrior Projects view.
  7. Right-click and select the Add Files option.

    The Open dialog box appears.

  8. Browse to the <CodeWarrior_Installation_Folder>\MCU\ColdFire_Support\Profiler\include\ location.
  9. Select Profiler.h and ProfilerTimer.h file with Ctrl key pressed and click Open.

    The File and Folder Import dialog box appears.

  10. Select the Copy the files and directories option and click OK.

    The files are added to the Project_Headers folder.

To add the profiler library, ProfileLibrary_CF_Runtime.a:

  1. Select your project in the CodeWarrior Projects view.
  2. Right-click and select the Properties option from the context menu.

    The Properties for <project name> dialog box appears.

  3. Expand the C/C++ Build node in the tree structure on the left, and select the Settings option.
  4. In the Tool Settings tab page, expand the ColdFire Linker node in the left tree structure.
  5. Select the Input option.
  6. In the Library Files section on the right side of the tab page, click the Add.. button to open the Add file path dialog box.
  7. Click the File system button.

    The Open dialog box appears.

  8. Browse to the <CodeWarrior_Installation_Folder>\MCU\ColdFire_Support\Profiler\Lib location.
  9. Select the ProfileLibrary_CF_Runtime.a file and click Open.

    The complete path of the file appears in the Add file path dialog box.

    Figure 2. Add File Path Dialog Box
    Add File Path Dialog Box
  10. Click OK in the Add file path dialog box.

The profiler library gets added to the Library Files section.

Figure 3. Tool Settings Page of Properties Dialog Box
Tool Settings Page of Properties Dialog Box