How To Compile Harmony Project for Microchip IoT Ethernet Kit

Date: April 9, 2017

Author: Medium One

 

This document describes how to set and compile the Microchip IoT Monitoring kit, to generate a hex image file, and to flash the board.  These instructions are for Mac OS. For Windows, please refere to this project and readme https://github.com/medium1/iot-smart-sensing-microchip/tree/master/windows_project.  

 

Files:

 

Step 1: Install Toolchain

Install the 3 installer files.  Do not update to the latest version.  At the time when this project was created, it is only compatible with this version.  

Note: MPLab and XC are installer in Applications folder.  Harmony is installed in ~ directory.

Make sure you check Add xc32 to path when installer XC compiler

/Applications/microchip/mplabx/

/Applications/microchip/xc32/

/Users/dthai/microchip/harmony/

Step 2: Unzip Project

Unzip iot-smart-sensing-microchip-master-04092017.zip in your home directory.  I.e. /Users/demo for mac.

ie.

 /Users/demo/iot-smart-sensing-microchip-master

Step 3: Open MPLab and Project

Run MPLab.  

Click File->Open Project.  Select project from the unzipped project from Step 2

ie

/Users/demo/iot-smart-sensing-microchip-master/medium1-iot-ethernet/firmware/medium1-iot-ethernet.X

After the project loads go to next step.

 

Step 4: Set Compiler to v1.42

Select “Customize” from the dropdown toolbar

On popup, select XC32 (v1.42).  If you don’t see v1.42 you didn’t do Step 1 properly.

 

Important: Click Apply then OK.

 

Step 5: Build the project

From toolbar, click on the icon below and “Clean and Build Project…”

If you have the output window open, you should see the following messages as the project builds…

when completed, you should see “Build Successful..” in green font.

The generated .hex file will be located in your project folder in:

dist/IoT-Ethernet/project/medium1-iot-ethernet.X.production.hex

Congrats! You’re done compiling your new hex file. Next, refer to the following tutorial on how to program the newly generated .hex image to the board.

How to program the board:

https://blog.mediumone.com/2016/07/microchip-flashing-instructions/

 

Quick Start Guide:

https://blog.mediumone.com/2016/05/microchip-quick-start/

broni@medium.one'

Author: Broni