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:
- In the CodeWarrior Projects view, expand the Sources folder of your project.
- 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.
- Save and build the project.
- Open the Debug Configurations dialog box, and select your project in the tree structure.
- Click the Trace and Profile tab, and check the Enable Trace and Profile checkbox.
- Select the Profile-Only option from the Trace Mode Options group.
- Click Apply to save the settings.
- Click Debug to debug the application.
- Click Resume and after a short while, click Suspend.
The application halts and data is collected.
- 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 
This is how you collect trace data in the Profile-Only mode of the HCS08 target.