6.3 Debug the Examples

Do one of the following, based on the example you are using:

  1. For examples 1, 2, and 3, create a file to hold the example code:
    1. Right click on the “Source Files” folder in the Projects window. Select New>main.c. The “New main.c” dialog opens.
    2. Under “File name,” enter a name (e.g., examplen), where n is the example number.
    3. Click Finish. The file opens in an editor window.
    4. Delete the template code in the file. Then cut and paste the example code from this user’s guide into the empty editor window and select File>Save.
  2. For examples 4 and 5, follow the instructions in each section to generate code using MCC and then edit the main.c file with the code shown.

Finally, select Debug Project

to build, download to a device, and execute the code. View the demo board LEDs for output. Click Finish Debug Session
to end execution.