Collecting Trace in Profile-Only Mode

The Profile-Only mode does not collect the trace data; it only profiles the data. Trace is empty in this mode; you can only see the critical code data in the Critical Code viewer. To collect trace in Profile-Only mode:

  1. In the CodeWarrior Projects view, expand the Sources folder of your project.
  2. Double-click the source file, for example, main.c to display its contents in the editor area. Replace the source code in the main.c file with the source code shown in Listing: Source code 2.
  3. Save and build the project.
  4. Open the Debug Configurations dialog box, and select your project in the tree structure.
  5. Click the Trace and Profile tab, and check the Enable Trace and Profile checkbox.
  6. Select the Profile-Only option from the Trace Mode Options group.
  7. Click Apply to save the settings.
  8. Click Debug to debug the application.
  9. Click Resume and after a short while, click Suspend.

    The application halts and data is collected.

  10. Open the Critical Code viewer following the steps explained in the Viewing Data topic to view the critical code data results.
    Figure 1. HCS08 Critical Code Viewer - Profile-Only
    HCS08 Critical Code Viewer - Profile-Only

This is how you collect trace data in the Profile-Only mode of the HCS08 target.