Configuring Kinetis Cortex M0+ Core

Perform the following steps to configure Kinetis Cortex M0+ core:

  1. In the CodeWarrior Projects view, right-click the project and select Debug As > Debug Configurations from the context menu.

    The Debug Configurations dialog box appears.

  2. In the Debug Configurations dialog box, expand the CodeWarrior Download configuration in the tree structure on the left, and select the launch configuration corresponding to the project you are using. For example, select Kl25_test_FLASH_PnE U-MultiLink.
  3. Check that the file sa_mtb.c exists in the Sources folder of the CodeWarrior Projects view.
  4. Select the Trace and Profile tab.
  5. Check the Enable Trace and Profile checkbox.
  6. In the Trace Buffer Size drop-down box, change the value of the trace buffer size to 0x100 for the KL05 device and 0x200 for the KL25 device. There are a variable number of predefined sizes depending on the target. The maximum value varies from 0x80 on KL05Z to 0x1000 on KL25Z128.
    Figure 1. Setting Trace Buffer Size
    Setting Trace Buffer Size
  7. Click Apply.

    The Enable Trace and Profile message box appears displaying that MTB support is enabled.

    Figure 2. Enable Trace and Profile Message Box
    Enable Trace and Profile Message Box
  8. Click OK in the Enable Trace and Profile message box.
  9. Build the project again.
Note: You can remove the MTB support from the project by using the CodeWarrior Projects view. Right-click the project in the CodeWarrior Projects view, and select Profiler > Remove MTB support to remove the MTB support. You can select Profiler > Add MTB support to add it again.