Step 5: Build Project, Program MCU

Step 5.1: Specify the C Include Directories for the Compiler

The Include Directory paths are used by the C compiler to find files referenced through #include directives. This is the preferred method of referencing include files that are not at the root of your project directory, as opposed to using relative paths in code: #include "subdirectory/filename.h".


Right-click on the project and select Properties.



Click on Conf: [default] > XC16 > xc16-gcc.


Click on the drop-down for Option Categories and select Preprocessing and messages.


Click the C include dirs triple dot box.



Browse for <your MPLAB X IDE project folder>. Add each highlighted directory and click Open. Click the Browse button to select the next directory. This directive permits files in these directories to be added to the build process.

Note: Directories can only be selected one-at-a-time.



The C include dirs window should be the same as the image below. Press OK to apply the changes.


Step 5.2: Build Application


Right-click on the project and select Build.



The project will successfully build.


Step 5.3: Program MCU


Click the Make and Program Device icon to program the MCU.



On the Starter Kit on Board tab, you will be able to see “Programming/Verify complete”.

© 2024 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.