Step 7: Debug Your Application

Last modified by Microchip on 2024/02/06 09:26

Congratulations! You are ready to debug debug-project icon your fifth application!

Before you program and run our application, make sure that the micro SD card has at least one audio file saved on it.

Make sure that the micro SD card is inserted into the micro SD card slot (J8) on the MEB II.

Before you start the debugger, you may want to set a breakpoint in the application file in app_display_task.c to verify that important stages of the application are executed successfully.

Put a breakpoint in APP_DISPLAY_Tasks which will indicate that the graphics library has finished drawing the current screen and that the application is now ready to populate the list box object with the track list.

breakpoint in APP_DISPLAY_Tasks


To gain a better understanding of graphics objects event handling and how the custom actions are executed, you may want to put breakpoints in the processEvent function (liberia_event.c file).

breakpoints in the processEvent function


Debug your application! Click the Debug Main Project debug-project icon icon.

Remove all breakpoints and press key F5 to allow the application to run.

You should see the display now. Notice that the display looks the same as MPLAB® Harmony Graphics Composer's (MHGC) simulated display.

Experience the different features of the user interface:

  • Change the application mode from 'player' to 'reader' by selecting the radio buttons.
  • Press the scroll up/scroll down buttons to navigate through the tracklist.
  • Increase/decrease the volume by changing the volume slider position.
  • Mute/unmute the volume by pressing the volume mute button.

Connect a headphone to the HP Out connector on the MEB II and listen to your favorite music. Notice the track list will scroll as the tracks get played out one after the other.

Back to Top