(c) 2019 by Matthias Arndt marndt@asmsoftware.de
The MIT License applies. See LICENSE for details.
This is a build script to compile the STM32 HAL drivers once into a static library for reuse on STM32 "Blue pill" projects.
- arm-none-eabi compiler toolchain
- CMake
- STM32 Cube Firmware (as downloaded through the STM32 CubeMX software)
A basic library configuration header for all features is included.
The resulting library can be linked with any other project without having to recompile from source.
The CMakeLists.txt should be setup to use the arm-none-eabi GNU toolchain. It is recommended to use a suitable toolchain description file for CMake.
The author uses https://github.com/vpetrigo/arm-cmake-toolchains in particular.
- link the .a file
- reference the HAL include files in your project
- reference the CMSIS device specific headers if necessary (some HAL headers require them)