Follow the next steps to build the project with CMake on any platform.
-
CMake Version: The project requires the 3.28 minimum version for CMake, so make sure to have the right version installed. To check the version:
cmake --version
-
Arm GNU Toolchain: To build an embedded project base on Amr Cortex is required to have the right compiler toolchain. Download it from Arm's official website for your OS. Or get it with a package manager.
macOS:
brew install arm-none-eabi-gcc
Linux:
sudo apt-get install arm-none-eabi-gcc
Windows
choco install gcc-arm-embedded
At this point you have the needed tools. Run the following bash commands to create a folder called build to store all the files generated by CMake, including the .bin and .elf files. The -S flag is needed to provide the directory that contains the source files (" . " means the directory you are located rigth now), and -B flag speifies the build directory (if it does not exist CMake will create it for you). Then you run the command that acctually builds the program.
cmake -S . -B build # use the current directory as source dir and create build
cmake --build build # compiles the project in the build folder
- Lavora nel tuo branch e fai pull request?
- altro
- inoltre