16.3.4 Application Selection
The following steps help the user to migrate from the WBZ451 module to the WBZ451H module.
- Run the MPLAB® X IDE tool.
- In the opening widow of the MPLAB X IDE, the user must locate the WBZ451 application intended for migration. Note: It is important to select the correct application to ensure a smooth and targeted migration.
- Access the project properties option in MPLABX IDE. From the “default” drop-down list, select Customize.
- In the Project Properties window, perform the following steps:
- The user must update the device name. From the “Device:” field drop-down list, select WBZ451H.
- From the Packs window, choose the latest version of the Device Family Pack (DFP). From the list of packs, select 1.4.243.Note: The user must select the suggested DFP version.
- The user must opt for the latest CMSIS version. From the CMSIS folder, select 5.8.0.
- The user must select the recommended compiler version. From the “Compiler Toolchain:” field, select XC32 (v4.35) [C:\Program Files\Microchip\xc32\v4.35\bin]. For more details, refer to the Tools and Harmony Component Versions.
- Click Apply, then click OK to ensure successful implementation of the configuration adjustments.
- To verify the availability of the BSP component, the user must navigate to the designated application directory. For example, go to H3\wireless_apps_pic32cxbz2_wbz45\apps\ble\building_blocks\central\central_conn\firmware\src\config\default.
- After finding the BSP component, the user can proceed to modify the
.mc3
file to include support for the WBZ451H module. - To achieve this, the user must either manually edit the
.mc3
file or run the attached Python file. If opting for the Python script, the user must perform the following steps:- Run the
migration_bsp.py
Python script from its existing directory (\EV79Y91A), passing the path of the application as an argument. - After the Python script successfully executes and performs the replacements, the terminal displays the log messages confirming the successful changes.
- Run the
- If the user chooses to manually edit the
.mc3
file, perform the following steps:- Go to the location of the
.mc3
file within the project. - In the
.mc3
file, replace all instances of the nameBSP_PIC32CX_BZ2_Curiosity
/BSP_WBZ451_Curiosity
withBSP_WBZ451HPE_Curiosity
. - Save the
.mc3
file.
- Go to the location of the
- After finding the BSP component, the user can proceed to modify the
- Go to
application_name\firmware\src\config\default\default.mhc\settings.yml file. In
the
settings.yml
file, perform the following steps:Note: If thesettings.yml
file is not available, skip this step and proceed to step 7.- Change the processor name. For
example, change it to
WBZ451H
. - Change the DFP path. For example, change it to dev_packs\Microchip\PIC32CX-BZ_DFP\1.4.243\WBZ451H\atdf\WBZ451H.atdf.
- Save the
settings.yml
file.
- Change the processor name. For
example, change it to
- After configuring the project properties, the
.mc3
file andsettings.yml
file as per the requirements, run the Microchip Code Configurator (MCC) to begin the code configuration process.- In the MPLAB X IDE opening window, click MCC.
- The following pop-up window appears, requesting approval for updating the MCC core. Click Yes to proceed.
- The following pop-up window appears, requesting approval to migrate the configuration files from WBZ451 to WBZ451H. Click Yes to proceed.
- Select the necessary framework path with respect to the WBZ451H to enable application creation, generation or migration. Click Next to proceed.
- Choose the necessary DFP path with respect to the WBZ451H. Click Next to proceed.
- Choose the necessary CMSIS path with respect to the WBZ451H. Click Next to proceed.
- The following pop-up window appears, showing the details of the available package versions. Click Continue to proceed.
- The MCC now generates the project graph, which the user can view in the Project Graph tab.Note: The user must wait until the MCC generates the project graph.
- The user can verify the pin settings in the Pin Settings tab. Open the pin table and ensure that the following pins are not in use for any purpose; they must appear inactive or disabled:
- Pin 30 - CRX (RA9)
- Pin 32 - CTX_CHL (RA10)
- Pin 38 - CPS (RB1)
- After verifying the pin settings, the user must perform a force update on all components. The following are the steps to perform a force update:
- In the Resource Management [MCC] tab, under the “Project Resources” field, right-click on the Generate tab, then select Force Update on All.
- Click Generate to start the process.
- After generating the code, the MCC initiates a merging process, prompting to incorporate changes from the WBZ451 module to the WBZ451H module. The merging process is not going to make changes to the application files containing customized code.Note: The merging process does not modify any application files with names beginning with
app_
. - However, some applications do not require certain mergers. For more details on incorporating essential changes, refer to the PIC32CXBZ2 Application Developer’s Guide.Note: The user must perform a thorough check to ensure the generation process is complete.
- After completing the project generation, the user must initiate the process of building the main application. In the MPLAB X IDE tool bar, click Clean and Build. From the drop-down list, select Clean and Build Main Project.
- Clean and build the main application, ensuring that the build is successful.
Note: If creating the project from scratch, the user must consider the following:
- The user does not need to execute a manual process or run a Python script to replace the BSP device name in the
.mc3
file. For more details, refer to step 5. - Pin 30, 32 and 38 must appear inactive or disabled. For more details, see step 13.
- The user does not need to make changes to the
device.h
,definitions.h
andbsp.h
files. For more details, see step 15.