This project is an example how software for STM32 microcontroller can be developed using pure C++. As build system, this project use CMake. Project also show how Googletest framework can be integrated into project for unit testing.
Project is develop on XNUCLEO-F411RE board from Waveshare manufacturer. For build purpose Linux base system is used.
- Pure C++,
- CMake build system,
- Unit tests with Googletest framework.
List of the external software and frameworks:
- D-Ral for register access,
- stm32-cmake-utils CMake utility,
- Googletest for Unit Tests.
- Linux base system,
- CMake > 3.20,
- GNU Arm Embedded Toolchain.
Clone repository
git clone https://github.com/gembcior/stm32-cmake-f411xe.git
Make build workspace directory
mkdir -p build
Go to build workspace directory
cd build
Configure CMake project and pass path to Arm toolchain
cmake ../stm32-cmake-f411xe -DSTM32_TOOLCHAIN=/path/to/toolchain
Build project
cmake --build .