Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 4.23 KB

iot-ethernet-firmware-compile-and-program.md

File metadata and controls

60 lines (46 loc) · 4.23 KB

IoT Ethernet Firmware

Compile and Programing


Introduction

This document will show you where to find the latest released version of the firmware source, how to compile it, and then program it into the IoT Ethernet Kit


Required Tools and Applications

Microchip Required Tools and Applications

You will need the following Microchip development tools to program and develop with the Microchip IoT Ethernet.

More information about Microchip tools can be found on Microchip's developer help site


Compiling and programming the IoT Ethernet Board

Example below is shown on MAC OS X, these instructions may vary slightly on different OS.

Compiling the Firmware

  1. Extract the zip file downloaded from the git repository to a location of your choice
  • Open MPLAB® X IDE
  • Select File -> Open Project
  • Navigate to: <path-to-your-project>/aws-iot-firmware-pic32mz/software/aws-iot-ethernet/firmware
  • Select the project aws-iot-ethernet.X
  • With your project opened, right click on the project aws-iot-ethernet in the Projects tab and select Set as Main Project
  • Select the configuration for the board you wish to program from the dropdown box at the top.
  • Follow these directions to install the Microchip Harmony Configurator (MHC): Steps to Install MHC
  • Open the MHC by clicking Tools -> Embedded -> MPLAB Harmony Configurator
  • The MHC will prompt asking to choose a Harmony framework to use, select "Yes" and select the location of your Harmony install and click "OK"
  • The MHC will then ask if you want to open the configuration file IoT-Ethernet.mhc for the aws-iot-ethernet project, select "Open" to proceed.
  • With the new Harmony framework selected for your project, you will need to regenerate code by clicking the generate code button.
  • A settings window will pop up, check only the box "Create a backup...":
  • The MHC merge tool will show differences between code sets. Ignore the differences and hit "Close" for each file
  • We can now try compiling and programming the code.

Programing the IoT Ethernet Board

  1. Connect the PICKit™ 3 to your computer using the provided USB cable.
  • Connect the PICKit™ 3 to the IoT Ethernet ICSP 6-pin header. The pins should match by aligning the triangles.

  • Power on the starter kit by connecting a Micro-USB cable to a power source and changing the power switch on the board to USB.

  • On the top tab of MPLAB® X, click the Make and Program Device Main Project button.

    MPLAB® X may prompt you to select with programmer to use. Select PICKit™ 3 from the prompt and continue.


Troubleshooting

If you are having trouble, check to make sure that each of the issues bellow are resolved.

Project won't compile due to missing files

  • Often times a project won't compile if you are on a Windows machine due to a limitation in the path length. Windows OS has a max path length of 260 characters, so file paths are sometimes truncated when attempting to compile which leads to files not being found by the compiler. Try putting the project in the topmost directory, usually "C:/". For more information please see MSDN article from Microsoft.