Getting Started with USB on SAM MCUs Using MPLAB® Harmony v3: Step 4
Generate Code
By default, the Autosave MPLAB® Code Configuration (MCC) configuration file option is enabled. That means MCC automatically saves your MCC configurations.
Now, generate the code by using MCC. From the left side tab, Resource Management (MCC), go to Project Resources and click on the Generate button.
Once this process completes, switch to the MPLAB X IDE window. You may now examine the generated code through the Projects tab. MCC will include all the requisite MPLAB Harmony v3 Framework files and generate the configuration code dynamically based on your MCC selections. MCC will then automatically organize and add the generated code as files and folders to your 32-bit MPLAB Harmony 3 Project.
MCC generates a default template main file main.c and application files app_sensor.c/.h app_eeprom.c/.h app_usb.c/.h based on your MCC configuration. These will be used for the Sensor, EEPROM and USB Task state machines.
You will also notice that the Peripheral Library (PLIB) files are generated for the TC, TWIHS, AFEC, and PIO peripherals. The files for the USB Device Stack Middleware, I²C Drivers, and the Timer System Service are generated as well.
Build the code by clicking on the Clean and Build Main Project in the MPLAB X IDE and verify that the project builds successfully.