Create a Board Support Pack - Hands-On Example
February 26, 2025 ยท View on GitHub
This repository explains the steps to create a board support pack using the Open-CMSIS-Pack technology.
The pack contains a development board from the imaginary "ACME Corp.". It contains:
- Source code, libraries, header/configuration files for the underlying hardware and documentation (user manuals, getting started guides, and schematics).
- A CMSIS-Driver VIO for on-baord LEDs
- Flash programming algorithm for external board memory
| Content | Description |
|---|---|
gen_pack.sh | Script that builds the pack; refer to usage information for configuration details. |
.github/workflows/pack.yaml | GitHub workflow that generates the pack on every commit. |
Benefits for a Board Vendor
-
Connection to users: as board vendor you control distribution to multiple tools and web portals. For the Arm pack system new releases are scanned once per day, making it available to the entire user base. Documentation links in the software pack let you connect with your users.
-
One way to distribute: for all relevant toolchains as CMSIS supports Arm Compiler, GCC, and IAR. Software scales to many devices when APIs are applied (as in this example CMSIS-Driver).
-
Reduces support efforts: as it is easier for customer to use a board in projects. Product Lifecycle Management simplifies updates and notifies users about outdated configuration files and deprecation of products.
To learn more review the session about Generating CMSIS-Packs for Boards.
DFP and BSP Hands-On Session
A webinar explains how to use this repository:
The webinar slides can be found here.
Pack Development
The following section explains how to create a pack.
Tool-Environment (Recommended)
- MDK v5.41 with default installation path (C:\Keil_v5)
- CMSIS-Toolbox v2.7.0 or higher (update files in C:\Keil_v5\ARM\ctools)
- VS Code with XML Language Support by Red Hat
Steps to Create a Board Support Pack
- Gather technical details
- Gather all technical details of your development board that need to be listed.
- Create Flash programming algorithms for external memories (if applicable).
- Organize and create the file list that will be delivered as Pack
- Create the PDSC file using your favorite editor (we recommend VS Code with XML extension).
- Validate the software pack using the
packchktool. - Create the software pack using the
gen_packlibrary.
A board support example is explained in this meeting recording starting at xx:xx.
Local Pack Development
-
Clone this repository (as it serves as a getting started example)
-
Register this pack with
cpackgetvia PDSC file using this commands:cpackget update-index // optional to ensure that pack index is up-to-date cpackget add ACME.ACMECM4_BSP.pdsc // pack now appears in toolchains, i.e. in MDK csolution list packs -
The content of the pack can now be seen in the Manage Component dialog of uVision.
For changing the PDSC file it is recommended to use VS Code with XML extension, but any editor would work.
After modifications to the PDSC file run packchk; include all packs that are required by your software in the validation:
Using Command Prompt:
packchk ACME.ACME_BSP.pdsc -i ACMECM4_DFP.pdsc -i %CMSIS_PACK_ROOT%/ARM/CMSIS/6.1.0/ARM.CMSIS.pdsc
Using Git Bash console:
packchk ACME.ACMECM4_BSP.pdsc -i ACMECM4_DFP.pdsc -i $CMSIS_PACK_ROOT/ARM/CMSIS/6.1.0/ARM.CMSIS.pdsc
The pack can be created locally in the directory output using Git Bash:
./gen_pack.sh -v
Verify Pack in Tools
To verify the tools such as the VS Code - Keil Studio Desktop extension, install the pack with:
cpackget add ./output/ACME.ACMECM4_BSP.1.0.0.pack
Notes:
- VS Code - Keil Studio Desktop does not yet support pack installation from local repositories.
- To continue local pack development, change add a new <release> version. During development semantic version labels to indicate a pre-release may be used as shown below:
<releases>
<release version="1.0.1-rc0">
Further development
</release>
<release version="1.0.0" date="2023-04-22">
Initial version
</release>
</releases>
Pack Creation on GitHub
Once changes are committed the GitHub Action creates the pack.
Publish Pack
The pack can be hosted on the <url> specified in the *.pdsc file.
Refer to Publish a Pack in the Open-CMSIS-Pack specification for further details.
Issues and Questions
Use Issues on this GitHub to raise questions or submit problems.
Happy Packing!
