6.3 Debug the Examples
Do one of the following, based on the example you are using:
- For examples 1, 2, and 3, create a file to hold the example code:
- Right click on the “Source Files” folder in the Projects window. Select New>main.c. The “New main.c” dialog opens.
- Under “File name,” enter a name (e.g., examplen), where n is the example number.
- Click Finish. The file opens in an editor window.
- 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.
- For examples 4 and 5, follow the instructions in each section to generate code using
MCC and then edit the
main.cfile 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.
