Step 9: Generate Code
1
Save the configuration and generate the code as shown below:
2
Resolve code generation merge conflicts.
When the Generate button is clicked, MHC will modify and generate source files based on the options selected in MPLAB® Harmony Configurator (MHC). If MHC generates code that will change a pre-existing file, it will show you the code it generated and allow you to confirm if you want to add it to your source code.
For this lab, you should not get any merge conflicts as no custom code was added to the files that are generated or modified by MHC.
3
Examine what was done after generating code.
The app folder contains files related to your specific application. In the following steps, you will add your application code to the existing app.c and app.h files. You will also add other application specific source files to the project.
The framework folder under the app folder
(app/system_config/pic32mz_ef_sk_meb2/framework) contains customized Framework files. These files have been generated by MHC in response to your specific MHC selections.
Also note, MHC has generated a third_party logical folder
(app/system_config/pic32mz_ef_sk_meb2/third_party), which contains the configuration files required by the SEGGER emWin graphics library, GUI and touch control wrapper.
MPLAB® Harmony groups all source files supporting a specific hardware platform into its own system_config folder (named pic32mz_ef_sk_meb2 in this case). Doing this enables one MPLAB X IDE project to support multiple hardware platforms by using its project configurations feature. "Project configurations" includes or excludes hardware specific configuration folders based on the target hardware you select for a specific build.
The folders under the Source Files/framework folder contain standard Framework files that have been added to your project by MHC (based on your MHC selections). To be clear, unlike the framework files found under the app folder, these files have not been modified by MHC. These are standard MPLAB® Harmony Framework files included in the Framework download.
Source Files/framework/decoder contains Audio Decoder library files.
Source Files/framework/driver contains Driver library files.
Source Files/framework/system contains System Service library files
Source Files/framework/usb contains USB library files