Measuring Power Consumption with PAC1934 Step Step 5: Build Project, Program MCU

Last modified by Microchip on 2023/11/09 08:59

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.

Select project 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.

Configure the settings

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.

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

Include folders

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

Include directories

Build Application
Right-click on the Project and select Build.

Build project

The project will successfully build.

Build successful

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

Click make and program device

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

Program verify and complete