Step 6: Debug Your Application

Last modified by Microchip on 2024/01/29 21:40

Congratulations! You are ready to debug debug project icon your second application.

Before you program and run your application, you need to program the micro SD card with the audio text file.

Go to the dev_files folder of this lab
(apps/training/middleware/audio_player/audio_player_lab2/dev_files) and copy the tone.txt file into the micro SD card.


Insert the micro SD card into the micro SD card slot (J8) on the MEB II Board.

Before you start the debugger, set a breakpoint in the application file in app_tone_textfile_sdcard.c. Through this breakpoint, you can observe that the APP_TONE_TEXTFILE_SDCARD_Tasks() is successfully able to open the CODEC driver.

Breakpoint 1


Put a breakpoint in the APP_TONE_TEXTFILE_SDCARD_STATE_CARD_MOUNT state. Through this breakpoint, you can observe that the file system was successfully mounted on the SD card.

Breakpoint 2


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

Single-step (by pressing the F7 key) to observe the flow of the application state machine.

Put a breakpoint in the buffer event handler. Hitting this breakpoint in the event handler indicates that the last submitted buffer is transferred to the CODEC.

Breakpoint 3


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

Connect headphones to the HP Out connector on the MEB II and you should hear a tone.

Back to Top