CMake for Arm Cortex-M
An example repository of using CMake with the arm-none-eabi-gcc compiler for an Arm Cortex M4 processor.
Install the tools
Install the required tools, make sure they are in the system path
Cloning
This repository includes submodules. When cloning, use the --recursive
flag.
git clone --recursive https://github.com/ryanwinter/cmake-arm-cortex-m
Building with CMake
Debug GCC
cmake --preset debug
cmake --build --preset debug
Release GCC
cmake --preset release
cmake --build --preset release
Debug IAR
cmake --preset debug-iar
cmake --build --preset debug-iar
Release IAR
cmake --preset release-iar
cmake --build --preset release-iar
Debugging with VSCode
The repository includes the necessary assets to build, flash and debug the application in VSCode using the Embeeded Tools extension
- Install VSCode
- Open the project folder in VSCode
- Press
F5
to build, flash and run the project
GitHub Build Workflow
Third party
This repository includes source from the following 3rd parties.