CMSIS-Pack Development Tools and Libraries
This repository contains the source code of command line tools and library components for processing meta information specified by CMSIS-Pack and CMSIS-Build which are written in C++ as well as build and test configurations targeting Windows, Linux and macOS host platforms.
CMSIS-Pack defines a delivery mechanism for software components, device parameters, and evaluation board support. The XML-based package description (PDSC) file contains the meta information of a so called 'Software Pack' which is a collection of files including:
- Source code, header files, and software libraries
- Documentation and source code templates
- Device parameters along with startup code and programming algorithms
- Example projects
The complete file collection along with the PDSC file is distributed as a zip archive using the file extension
CMSIS-Build defines an XML project file format that allows building projects based on hardware descriptions, software components, source modules and linker scripts distributed as software packs. The build manager (cbuildgen) is reading the project (`*.cprj) and generates the build instructions as CMake configuration files.
The end goal of this project is to provide a consistent and compliant set of command-line tools for covering the Software Pack lifecycle from creation and maintenance, via distribution and installation all the way to the project build, flash programming and debugging on the targeted microcontroller.
Repository toplevel structure
📦 ┣ 📂cmake local cmake functions and configuration files ┣ 📂docs documentation shared by all components ┣ 📂external 3rd party components loaded as submodules ┣ 📂libs reusable C++ library component source code shared by tools ┣ 📂scripts scripts used by validation, build and test actions ┣ 📂test test related files shared across tool and library components ┗ 📂tools command line tool source code
Building the tools locally
This section contains steps to generate native makefiles and workspaces that can be used in the compiler environment of your choice.
The instructions contain a complete guide to get you the project build on your local machine for development and testing purposes.
The following applications are required to be installed on your machine to allow components in this repository to be built and run.
Note that some of the required tools are platform dependent:
- A tool chain for your platform
- GIT Bash
- Visual Studio 2017 or 2019
- CMake (minimum recommended version 3.18)
☑️ Note: Make sure 'git' and 'bash' paths are listed under the PATH environment variable and set the git bash priority higher in the path.
- GNU Bash (minimum recommended version 4.3)
- GNU Compiler (minimum recommended version 5.4)
- CMake (minimum recommended version 3.18)
- make or Ninja
- GNU Arm Embedded Toolchain (version 10-2020-q4-major)
☑️ Required only for packgen tests. Set below mentioned environment variable: * CC : Full qualified path to GNU Arm Embedded compiler binary (arm-noneabi-gcc) for e.g. $export CC=/c/my/path/to/arm-noneabi-gcc
Clone github repository to create a local copy on your computer to make it easier to develop and test. Cloning of repository can be done by following the below git command:
git clone [email protected]:Open-CMSIS-Pack/devtools.git
This is a three step process:
- Download third party software components specified as git submodules.
- Generate configuration files for a build system
- Run build
Download third party software components
git submodule update --init --recursive
Create and enter the build directory
mkdir build cd build
Generate configuration files
As usual, the actual build steps vary by platform.
On Linux or MacOS use the following commands.\
DCMAKE_BUILD_TYPEis not selected, the binaries shall build with
cmake -DCMAKE_BUILD_TYPE=Debug ..
On Windows system use the following command to generate the complete workspace:
cmake -A x64 ..
One can trigger a build for all CMake targets or specific targets from the command line.
☑️ Note: The flag `--config` is optional. If it is not specified in the command, depending on the platform the binaries shall build in default configurations. - Windows: Debug - Linux/macOS: Release
Follow the respective commands:
Build all CMake targets
cmake --build . --config
cmake --build . --config Debug
Users can build specific target of their choice and build:
Select the CMake generated target from the list below:
Build the selected target and run command
cmake --build . --config
cmake --build . --config Debug --target CbuildUnitTests
One can directly run the tests from command line.
☑️ Required only when the pack repository/installed toolchains reside in places different from the default values. Set below mentioned environment variables: * CI_PACK_ROOT : Directory that contains the software packs in CMSIS-Pack format * CI_GCC_TOOLCHAIN_ROOT : GCC toolchain installation path for e.g. $export CI_PACK_ROOT=/c/my/path/to/Pack/Root $export CI_GCC_TOOLCHAIN_ROOT=/c/my/path/to/toolchain
Use the command below to trigger the tests.
ctest -C: Run all registered tests (Note: Running all the tests can take a while)
ctest -R: Run all tests matching the regex
ctest -C Debug or ctest -R CbuildUnitTests -C Debug
Using test executable:
Go to root build directory
Run the executable
cd build ./tools/buildmgr/test/integrationtests/windows64/Debug/CbuildIntegTests.exe
By default, few special tests are skipped from execution as they are dependent on specific environment configuration or other dependencies.
CI dependent tests :
These tests are designed to work only in CI (Continuous Integration) environment
AC6 toolchain test :
The below listed tests depend on a valid AC6 toolchain installed and can be run in the local environment on the installation of valid Arm Compiler 6.
☑️ Required only when the installed AC6 toolchain resides in places different from the default values. Set below mentioned environment variables: * CI_ARMCC6_TOOLCHAIN_ROOT : AC6 toolchain installation path for e.g. $export CI_ARMCC6_TOOLCHAIN_ROOT=/c/my/path/to/AC6/toolchain
Make sure you have the proper Arm Compilers licenses.
Open-CMSIS-Pack is licensed under Apache 2.0.
Contributions and Pull Requests
Contributions are accepted under Apache 2.0. Only submit contributions where you have authored all of the code.
Proposals, Reviews and Project
Please feel free to raise an issue on GitHub to start the discussion about your proposal.
We are in the early days and discuss proposals which we are dividing into 5 work streams with a dedicated label:
- Core Library Components - common libraries that are re-used across a range of tools. The PoC Tools are the first consumers, but the library components can also be used to create commercial derivatives or in-house tooling.
- Overall Project Concept - procedures to generate packs and application software. We shall consider complex applications such as multi-core processor systems or secure/non-secure partitions.
- PoC Tools - command line tools and utilities that implement the overall concepts and are intended to be used for open-source projects or even integrated into commercial software tools.
- Process Improvements - documentation and tools that help the software community to streamline and secure the software delivery to the user base.
- Resource Management - describes the data models used to manage and organized software packs and application projects.
These Issues are tracked inside the project board
Please feel free to raise an issue on GitHub to report misbehavior (i.e. bugs)
Issues are your best way to interact directly with the maintenance team and the community. We encourage you to append implementation suggestions as this helps to decrease the workload of the very limited maintenance team.
We shall be monitoring and responding to issues as best we can. Please attempt to avoid filing duplicates of open or closed items when possible. In the spirit of openness we shall be tagging issues with the following:
bug – We consider this issue to be a bug that shall be investigated.
wontfix - We appreciate this issue but decided not to change the current behavior.
out-of-scope - We consider this issue loosely related to CMSIS. It might be implemented outside of CMSIS. Let us know about your work.
question – We have further questions about this issue. Please review and provide feedback.
documentation - This issue is a documentation flaw that shall be improved in the future.
DONE - We consider this issue as resolved - please review and close it. In case of no further activity, these issues shall be closed after a week.
duplicate - This issue is already addressed elsewhere, see a comment with provided references.