Step 8: Include Application Specific Source Code and Files
1
Copy the following application source files into the folder containing the project's source files:
app_thumb_drive_audio_task.c,
app_thumb_drive_audio_task.h,
app_display_task.c,
app_display_task.h,
decoder.c, and
decoder.h.
Copy them from this folder:
apps/training/middleware/thumb_drive_player/thumb_drive_player_lab/dev_files
to this one:
apps/training/middleware/dev/thumb_drive_player/thumb_drive_player_lab/firmware/src
2
Add app_thumb_drive_audio_task.c, app_display_task.c, and decoder.c to the Source Files/app folder (in the MPLAB X IDE Projects pane) by right-clicking and selecting Add Existing Item…
3
Add app_thumb_drive_audio_task.h, app_display_task.h, and decoder.h to the Header Files/app folder by right-clicking and selecting Add Existing Item…
The files under the project should look like this:
4
This step is needed to work around an issue in Harmony version 1.08. This version locates the audio decoder libraries in a demo application under the …/v1.08/apps folder. These libraries should instead be located under the …/v1.08/framework folder. It is expected that version 1.09 will address this issue.
Harmony version 1.08 provides audio decoder libraries in one of the many demo applications that are included in the Harmony download. They can be found here:
<HarmonyInstallPath>/apps/audio/universal_audio_decoders/firmware/src/audio_decoder.
Note: Harmony version 1.09 will move these libraries under the …/framework/decoder folder. If you are using a newer version, you can skip this step.
Your project needs to use the WAV decoder found in the universal_audio_decoders demo application. Let the compiler know where it can find these source files.
To include this path, right-click on thumb_drive_player_lab in the Projects pane and select Properties. In the Categories pane, select:
Conf: [pic32mz_ef_sk_meb2] > XC32 (Global Options) > xc32-gcc.
In the Option categories dropdown menu, select Preprocessing and messages.
Click on Include directories.
Browse to this path:
<HarmonyInstallPath>/apps/audio/universal_audio_decoders/firmware/src/audio_decoder.
Click OK.
9
Save all files before closing.
10