Generated Sources and Header Files

The generated drivers will be included in the active MPLAB X IDE project, as shown in the figure below.

Figure 1. Generated Source and Header Files
  1. 1.The mcc.h and mcc.c files include the definitions of Configuration bits and the ‘OSCILLATOR_initializer’ function. These definitions are based on the settings made for the System module in the Composer. Also included is the ‘SYSTEM_initializer’ function, which can be called in the application program to call all the other default initializers (the ones marked in the GUI by sprocket symbol).
  2. 2.The pin_manager.h and pin_manager.c files include the Pin Manager initializer functions based on the configurations made in the Pin Manager GUI.
  3. 3.The interrupt_manager.h and interrupt_manager.c files are optional files generated only when peripheral interrupts are enabled, and they include interrupt initializer functions.
  4. 4.The .c and .h are module-specific files and include each module’s peripheral\library configuration functions.
  5. 5.The main.c file is generated even if a main.c already exists in the project. The user can review the code in the generated main.c file and merge the changes to the existing main.c file if required. The main.c file generated by the MCC may include commented-out code lines to enable interrupts. Remove the comments from the appropriate lines if the application requires interrupts to be enabled when it starts.
    Note: When using a main.c not generated by the MCC, the following lines need to be added to the main.c file‘#include "mcc_generated_files/mcc.h";’ and ‘SYSTEM_Initializer()’.

The functions provided in these MCC-generated files can be called from the user application code, as required. The MPLAB X IDE provides auto-completion assistance of all of the MCC-generated content. While editing source code in the project, start typing in an MCC API or MCC variable name, and press <CTRL+ Space>. The MPLAB X IDE will show a list of options to complete the entry.