Reading time: | 15 min |
Last updated: | 22 Aug 2023 |
Reading time: |
15 min |
Last updated: |
22 Aug 2023 |
This guide is intended to get you up and running with this tool quickly with the most common settings. For a thorough review of all options, refer to the official documentation.
The CMSIS-Toolbox is a suite of utilities for creating, building, and managing projects based on CMSIS Software Packs.
It is also used for the creation and maintenance of such packs.
CMSIS-Toolbox
is part of the
Open-CMSIS-Pack project
.
Windows, Linux, and MacOS host platforms are supported.
The below assumes Ubuntu Linux on an Arm based host. Instructions are similar for other platforms.
You will need to install cmake
and ninja
:
sudo apt update
sudo apt install cmake ninja-build -y
Check the versions of each tool:
cmake --version
ninja --version
If cmake
is earlier than 3.25.2, or ninja
is earlier than 1.10.2, you will need to uninstall that version and install by other means:
sudo apt remove -y cmake
sudo snap install cmake
sudo apt remove -y ninja-build
wget http://mirror.archlinuxarm.org/aarch64/extra/ninja-1.11.1-3-aarch64.pkg.tar.xz
tar -xf ninja-1.11.1-3-aarch64.pkg.tar.xz
Download and unpack the latest install file from GitHub. Downloads are provided in the Releases area of the repository.
wget https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases/download/2.0.0/cmsis-toolbox-linux-arm64.tar.gz
tar -xf cmsis-toolbox-linux-arm64.tar.gz
Projects can be built with Arm Compiler for Embedded, Arm GNU Toolchain, or IAR tools.
For further setup instructions see these Install Guides:
Arm Compiler for Embedded is installed below.
Set environment variables as below. Note the exact name of the TOOLCHAIN
variables will be based on the tool and version installed. In this way, multiple build tools can be registered.
Variable | Description | Notes |
---|---|---|
<name>_TOOLCHAIN_<major>_<minor>_<patch> | Path to toolchain binaries | <name> = AC6 , GCC , IAR , or CLANG |
CMSIS_PACK_ROOT | Path to CMSIS-Pack root directory | Use cpackget init to initialize |
CMSIS_COMPILER_ROOT | Path to CMSIS-Toolbox etc directory | |
PATH | Add CMSIS-Toolbox bin to path | Also path to CMake and Ninja if necessary |
For example:
export AC6_TOOLCHAIN_6_20_1=$HOME/ArmCompilerforEmbedded6.20.1/bin
export CMSIS_PACK_ROOT=$HOME/packs
export CMSIS_COMPILER_ROOT=$HOME/cmsis-toolbox-linux-arm64/etc
export PATH=$HOME/cmsis-toolbox-linux-arm64/bin:$PATH
cpackget init https://www.keil.com/pack/index.pidx
Example projects are provided on the GitHub repository .
Clone the repository to your build machine:
git clone https://github.com/Open-CMSIS-Pack/csolution-examples
Navigate to the Hello
example:
cd csolution-examples/Hello
Determine and install the necessary CMSIS-Packs for the project:
csolution list packs -s Hello.csolution.yml -m >packs.txt
cpackget add -f packs.txt
Generate cprj
project files for build targets within the solution project.
csolution convert -s Hello.csolution.yml
Use the cbuild
utility to build a project.
cbuild Hello.Release+AVH.cprj
The build will proceed and generate an executable image:
info cbuild: Build Invocation 2.0.0 (C) 2023 Arm Ltd. and Contributors
M650: Command completed successfully.
M652: Generated file for project build: '/home/ubuntu/csolution-examples/Hello/tmp/Hello/AVH/Release/CMakeLists.txt'
-- The ASM compiler identification is ARMClang
-- Found assembler: /home/ubuntu/ArmCompilerforEmbedded6.20.1/bin/armclang
-- The C compiler identification is ARMClang 6.20.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ubuntu/ArmCompilerforEmbedded6.20.1/bin/armclang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/ubuntu/csolution-examples/Hello/tmp/Hello/AVH/Release
[1/27] Building ASM object CMakeFiles/Hello.dir/home/ubuntu/packs/ARM/CMSIS/5.9.0/CMSIS/RTOS2/RTX/Source/GCC/irq_armv8mml.o
...
[27/27] Linking C executable /home/ubuntu/csolution-examples/Hello/out/AVH/Hello.axf
info cbuild: build finished successfully!
How would you rate the overall quality of this tool quick-install guide?
What is the primary reason for your feedback ?
Thank you. We're grateful for your feedback on how to improve this tool quick-install guide.