Skip to content
CMake Build script for the STM32 Cube Firmware for use with STM32F103C8 "Blue Pill"
C CMake
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CMakeLists.txt
LICENSE
README.md
stm32f1xx_hal_conf.h

README.md

CMake Build script for the STM32 Cube Firmware for use with STM32F103C8 "Blue Pill"

(c) 2019 by Matthias Arndt marndt@asmsoftware.de

The MIT License applies. See LICENSE for details.

Abstract

This is a build script to compile the STM32 HAL drivers once into a static library for reuse on STM32 "Blue pill" projects.

System requirements

  • arm-none-eabi compiler toolchain
  • CMake
  • STM32 Cube Firmware (as downloaded through the STM32 CubeMX software)

Configuration

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.

CMake invocation

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.

Usage in your own project

  • 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)
You can’t perform that action at this time.