This project builds a hardware abstraction layer (HAL) entirely in modern C++ (using C++-17). Care it taken to make "NO ASSEMBLY" startup code. Only the vector table is in the ".c" format.
The board used in this project is STM32F031K6 based Nucleo board.
The project is based on following tools:
cmake
+ninja
(use latest version)- ARM LLVM Clang compiler
- located in home folder, see
CMakePresets.json
.
- located in home folder, see
graphviz
for generating imagesSTM32CubeMx
Graphical hardware configurator for STM32 devices.
The following graph shows the various dependencies
Generate a simple GPIO toggle LED project for the Nucleo Board using STM32CubeMx
.
Use the main for the LED and construct memory mapped classes for devices and registers. More information here.