4.6 Running a Precompiled Application Example

This section gives a detail explanation on how to open, build and program an existing application example.

Prerequisites

  1. Installing the IDE and Compiler

  2. Installing the Device Family Part Pack

  3. Installing the MCC Plugin

  4. Installing the Harmony 3 Dependencies

COM Port Setup

To resolve COM port issues that prevent the output of text to the Tera Term terminal using the PIC32-BZ6 curiosity board, follow these steps:

  1. Close Tera Term and unplug the curiosity board from the computer.
  2. Open Device Manager.
    Figure 4-13. Device Manager
  3. Plug the Curiosity board back into the computer.
  4. In the Tera Term window, select “Serial”.
    • Select USB Serial Device from “Port”
  5. In the Setup tab, change the value from 9600 to 115200 in “Speed”. Click New setting to apply the changes.
  6. Press the Reset button on the board to see text on the terminal if the curiosity board is programmed to do that.

Opening, Building and Programming an Existing Application Example

  1. Connect Curiosity Board to the PC using USB cable.

  2. Open MPLAB X IDE.

  3. Select File > Open Project.

  4. Browse to project location of choice (In this example, it is ble_sensor) project, select project file from the location <Harmony Content Path>\wireless_apps_pic32_bz6\apps\ble\advanced applications\ble_sensor\precompiled_hex\ble_sensor.X.production.signed.hex.
  5. Open Project Properties:

    • Select PIC32-BZ6 Curiosity Board as hardware tool for programming

    • Ensure correct DFP is selected as mentioned in the Tools and Harmony Components

  6. Select XC32 compiler.

  7. Select option Build Project in IDE to compile the application example.

  8. Select option Run Project in IDE to program the target – the onboard debugger will program the example application.
    Note: A smartphone app might be needed to explore the full feature set of BLE Application examples.