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
Install Installing the IDE and Compiler
-
Install Install Device Family Part Pack
-
Install Installing the MPLAB® Code Configurator (MCC) Plugin
-
Install Install Harmony 3 Dependencies
Downloading Application Example from Discover
To download application examples such as wireless_apps_pic32cxbz3_wbz35 from MPLAB Discover platform, follow these
steps:
Note: In this application developers guide, the user
uses
wireless_apps_pic32cxbz3_wbz35 only as an example. The
user can choose any application example as per the requirement.- Open Microchip MPLAB Discover by clicking the MPLAB Discover
button.Note: The user can also access MPLAB Discover by going to Microchip MPLAB Discover.
Figure 4-17. MPLAB Discover - In the “Search” bar, enter the keyword wireless_apps_pic32cxbz3_wbz35.
- Press Enter on the keyboard to see the list of application examples.
- The “MPLAB Discover” window displays the list of application examples related to the PIC32CX-BZ3 and the WBZ35x wireless modules.
Figure 4-18. MPLAB Discover – List of Applications - The user can browse through the list of available applications.
- Click on any application example as per the requirement.
- Click Download to download the application example.
Figure 4-19. MPLAB Discover – Downloading Application - When prompted, the user must specify the path to save the downloaded
applications.
- By default, the system downloads the applications as a
.zipfile namedwireless_apps_pic32cxbz3_wbz35-1.1.1. - Click Save to continue.
- The
.zipfile contains all the selected application examples for the PIC32CX-BZ3/WBZ35x wireless modules.
Figure 4-20. MPLAB Discover – Downloading Application Path - By default, the system downloads the applications as a
COM Port Setup
To resolve COM port issues that prevent the output of text to the Tera Term terminal using the WBZ351 Curiosity Board, follow these steps:
- Close Tera Term and unplug the WBZ351 Curiosity Board from the computer.
- Open Device Manager.
Figure 4-21. Device Manager - Plug the WBZ351 Curiosity Board back into the computer.
- In the Tera Term window, select
“Serial”.
- From “Port:” drop-down list, select USB Serial Device.
Figure 4-22. USB Serial Port Selection - In the Setup tab, pefrom
the following steps:
- From “Port:” drop-down list, select the USB Serial Device.
- From the “Speed:” drop-down list, select 115200.
- Click New setting to apply the changes.
Figure 4-23. Serial Port Setup and Connection - Press the reset button on the
board to see text on the terminal if the WBZ351
Curiosity Board is programmed.
Opening , Building and Programming an Existing Application Example
- Connect the WBZ351 Curiosity Board to the PC using USB cable.
- Open MPLAB® X IDE.
- To select file, navigate to File>Open Project.
- Browse to project location of choice (In this
example, it is “ble_sensor_app”) project, select project file from the location
.<Discover Path>\wireless_apps_pic32cxbz3_wbz35\apps\ble\advanced applications\ble_sensor_touch\firmware\ble_sensor_touch.XAttention - Open Project Properties:
- Right-click on the “Project” and select Properties to open the project properties.
- In the Project Properties dialog, select WBZ351 Curiosity Board as hardware tool for programming.
- The user must ensure to
select the correct DFP
vx.xx.xxversion. For more details, see Install Harmony 3 Dependencies.
Figure 4-24. Project Properties – Hardware Tool DFP Compiler Selection - The user must ensure to select the correct XC32
compiler
vx.xxversion. For more details, see Getting Started with Software Development. - The user must ensure to select the
correct CMSIS
vx.x.xversion. For more details, see Getting Started with Software Development. - Click Clean and Build Main Project in MPLAB® X IDE to compile the application example.
Figure 4-25. Clean and Build Main Project - Click Make and Program Device Main Project
in MPLAB® X IDE to program the target. The on-board debugger
programs the example application.
Figure 4-26. Make and Program Device Main Project Note:- For more information related to the workings of the application example, refer to the PIC32CX-BZ3/PIC32CX-BZ36 and WBZ35x Application Developer’s Guide available in the ble_sensor_touch folder.
- The user might need a smartphone application to explore the full feature set of Bluetooth Low Energy application examples.
