Web Photo Frame Tutorial: Step 6

Step 6: Generate MPLAB® Harmony code


Generate and save the configuration as shown below:



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 MHC.


Examine what was done after generating code.

The app folders contain files related to your specific application. In the following step, you will replace the app.c and app.h files generated by MHC with new app.c and app.h files provided to you in the Lab Source Files and Solutions download.

The framework folders under the app folders (app/system_config/pic32mz_ef_sk_meb2/framework) contain customized framework files. These files have been generated by MHC in response to your specific MHC selections.

Also note that MHC has generated three custom graphics source files for you based on the selections you made in the previous step. It has placed these new source files in the Source Files/app/system_config/pic32mz_ef_sk_meb2 folder.

Click image to enlarge.
Click image to enlarge.

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 include or exclude 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/driver contains Driver library files.

Source Files/framework/gfx contains Graphics library files.

Source Files/framework/system contains System Service library files

Click image to enlarge.
Click image to enlarge.

If you were to build the project now, the build would fail as you have not added the necessary application code. You will add the application code in the next step.

Next Step >

© 2023 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.