Configure Project for Profiling

You need to configure the compiler and linker settings of your project. The compiler and linker using the profiler library generate a new version of your program ready for profiling. While it runs, the profiler generates data.

To configure the project for profiling:

  1. In the Tool Settings tab page, modify the Entry Point value as __start.
  2. In the Force Active Symbols section, remove the entry for __vect by clicking the Delete button.
    Figure 1. Configuration of ColdFire Linker Properties
    Configuration of ColdFire Linker Properties
  3. Select the ColdFire Compiler node in the left tree structure.
  4. Select the Processor option.
  5. Check the Generate Code for Profiling (-profile) checkbox.
    Figure 2. Configuration of ColdFire Compiler Properties
    Configuration of ColdFire Compiler Properties
  6. Select the Language Settings option in the left tree structure.
  7. Ensure that the Other flags text box on the right side has the entry: -define CONSOLE_IO_SUPPORT=1
    Figure 3. Configuring Language Settings
    Configuring Language Settings
  8. Click Apply to apply the settings.
  9. Click OK to close the Properties of <project name> dialog box.
  10. Expand the Project_Settings > Linker_Files node of your project in the CodeWarrior Projects view.
  11. Double-click the M5485EVB_Console_External_RAM.lcf file to open its contents in the editor area.
  12. Add the following statements at the end of the file before the last closing parenthesis:
    gCWProfileLibraryBuffer = _gCWProfileLibraryBuffer;
    CWProfileDataReady = _CWProfileDataReady;
    Figure 4. Modification in M5485EVB_Console_External_RAM.lcf File
    Modification in M5485EVB_Console_External_RAM.lcf File
  13. Save and close the file.

This configures the project for profiling.