arm-none-eabi-gcctoolchain in your PATH- CMake 3.19 or newer
- MSYS2 (Windows) or Make (Linux)
Configure first (run directly from your terminal, not via make):
cmake --preset debug-msys # Windows
cmake --preset debug # LinuxThen build:
makeThe default build type is Debug and the output binary is written to
Debug/<project-name>.bin.
To build a release, configure with the release preset and then make:
cmake --preset release-msys # Windows
cmake --preset release # Linux
make BUILD_TYPE=Releasemake upload COM=COM3
make upload COM=COM3 BUILD_TYPE=ReleaseOn Linux, use the device path instead:
make upload COM=/dev/ttyACM0qbossac is detected automatically from the qNimble Arduino board package if
installed. Otherwise it must be on your PATH, or set via QBOSSAC in
CMakeUserPresets.json (see CMSIS Setup for the preset format).
The CMSIS math libraries are required at link time. If the qNimble Arduino board package is installed, they are detected and used automatically.
If you see a linker error like:
cannot find -larm_cortexM7lfdp_math
CMSIS was not found automatically. Use one of the following options:
Set LIBRARY_PATH in your shell profile to include the CMSIS Lib/GCC
directory.
Linux / MSYS (~/.bashrc or ~/.bash_profile):
export LIBRARY_PATH=/path/to/CMSIS/Lib/GCC:$LIBRARY_PATHWindows (System Environment Variables):
Add the path to LIBRARY_PATH (create it if it does not exist).
Create a CMakeUserPresets.json in the repo root and set CMSIS_DIR to the
Lib/GCC directory for your installation. The preset must inherit one of the
platform presets (debug-msys / release-msys on Windows, debug / release
on Linux) so that it uses the correct build directory:
Windows:
{
"version": 3,
"configurePresets": [
{
"name": "my-machine",
"inherits": "debug-msys",
"cacheVariables": {
"CMSIS_DIR": "C:/path/to/CMSIS/Lib/GCC",
"QBOSSAC": "C:/path/to/qbossac.exe"
}
}
]
}Linux:
{
"version": 3,
"configurePresets": [
{
"name": "my-machine",
"inherits": "debug",
"cacheVariables": {
"CMSIS_DIR": "/path/to/CMSIS/Lib/GCC",
"QBOSSAC": "/path/to/qbossac"
}
}
]
}Then configure and build:
cmake --preset my-machine
makeNote: If you change
CMSIS_DIRafter an initial configure, delete the cache first or the old value will be reused:rm build/debug-msys/CMakeCache.txt # Windows rm build/debug/CMakeCache.txt # Linux cmake --preset my-machine
CMSIS ships with the qNimble Arduino board package. After installing the Quarto board in the Arduino IDE, the libraries are in:
- Windows:
%LOCALAPPDATA%\Arduino15\packages\qnimble\tools\CMSIS\<version>\CMSIS\Lib\GCC - Linux:
~/.arduino15/packages/qnimble/tools/CMSIS/<version>/CMSIS/Lib/GCC
CMSIS can also be downloaded directly from the ARM CMSIS repository.