A Board Support Package (BSP) provides code and configuration items to support board-specific hardware. It may be provided for Microchip development boards or may be defined by you for your own board. It allows you to manage board-specific settings and code in one place. Any changes to a BSP will propagate automatically to every configuration of every application that uses that BSP.
You need to define a BSP if you plan to use the same board for multiple applications (or for multiple configurations of an application).
In this training module, you will learn how to create a BSP for your custom development board. As an example we have chosen the PIC32MZEF Curiosity Development Board to create a BSP.
Development Board User's Guide Files
This project has been verified to work with the following versions of software tools:
- MPLAB® X IDE v3.50
- MPLAB® XC32 Compiler v1.42
- MPLAB® Harmony v2.02b
Because we regularly update our tools, occasionally you may discover an issue while using newer versions. If you suspect that to be the case, we recommend that you double check using the same versions that the project was tested with.
Archived versions of our tools can be found on the following Microchip websites:
MPLAB Harmony (see "Archived Downloads" tab)
MPLAB X IDE and XC32 Compiler (see "Downloads Archive" tab)
Note that multiple versions of all these tools can co-exist on the same computer.
| Windows|| Linux|| Mac OSX|
Integrated Development Environment
MPLAB® Harmony 1.xx
Integrated Software Framework
OverviewThe process for creating a BSP for your custom hardware is outlined below:
- Analyze the schematics of the custom hardware and decide on which pins are to be mapped in the BSP.
- Verify and update the global bsp.hconfig file with the device information related to the PIC32 part on your development board.
- Update the <device name>.hconfig to support your edvelopment board.
- Create a new folder with the necessary BSP files.
- Update the bsp.hconfig file in the local BSP folder.
The following steps need to be completed in a sequential manner to create a BSP for your custom development board:
- Step 1.1 – Criteria to map a pin.
- Step 1.2 – Decide on pins to be mapped in the BSP.
- Step 2.1 - Identify the document number of the device.
- Step 2.2 - Verify and update the global bsp.hconfig file.
- Step 2.3 - Update .hconfig file of the PIC32 device.
- Step 3.1 - Create a BSP folder.
- Step 3.2 - Modify the files in the BSP folder.
- Step 4.1 - Modify the local bsp.hconfig file.
- Step 5.1 - Create a new MPLAB Harmony project.
- Step 5.2 - Verify that the new BSP is created for the device.
- Step 5.3 - Verify BSP components in MHC.
- Step 6.1 - Generate code.
- Step 6.2 - Verify the system configuration.
- Step 6.3 - Build the application.
- Step 6.4 - Add application code.
- Step 6.5 - Test the application.
You created a Board Support Package (BSP) from scratch for your custom development board. You should be able to use the API's provided by your BSP in your application. With the BSP taking care of the clock and pin configurations, you can focus on your application development.
You analyzed the schematics and made an assessment on what goes into your BSP. You modified the <device_name>.hconfig file to make your BSP appear as an option in the MHC's BSP selection menu. You created a folder structure which supports your custom development board. You made board specific clock and pin configurations in the local bsp.hconfig. Finally, you tested your newly created BSP on an application.
With this tutorial we demonstrated how easy it is to create a BSP for your custom development board. The BSP can be used for all the applications you develop on your custom development board. All clock configurations and pin configurations will be taken care by MHC; all you need to focus on is development of your application.
Table of Contents