Step 7.1 - Generate Code from the MHC configuration
2
Resolve code generation merge conflicts.
When the Generate button is clicked, MPLAB® Harmony Configurator (MHC) will modify and generate source files based on the options selected in 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 the MHC.
Step 7.2 - Analyzing the files added after Generation
Let’s examine what was done after generating code:
The app folder contains files related to your specific application. In the following steps, you will replace Harmony generated application files app.c and app.h with the ones specifically written for this application.
The framework folder under the app folder (app/system_config/pic32mz_ef_sk_meb2/framework), contains customized Harmony Framework files. These files have been generated by MHC, in response to your specific MHC selections.
Harmony groups all source files supporting a specific hardware platform into their 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 Harmony 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 Harmony Framework files included in the Harmony Framework folder.
Source Files/framework/crypto contains Cryptographic Library files.
Source Files/framework/driver contains Driver Library files.
Source Files/framework/gfx contains Graphics Library files.
Source Files/framework/system contains System Service Library files.
Source Files/framework/tcpip contains TCP/IP Library files.
Source Files/framework/usb contains USB Library files.
Step 7.3 - Building the Project
Compile the project to verify that the generated project compiles properly without generating errors. Click onThe build fails as shown in the below graphics.
This error surfaces because the current I²C driver does not support the BYTE_STATIC_MODEL implementation. But the Camera driver uses this legacy implementation of the I²C driver.
You will add the required files at the framework level in the next section, to get this resolved.