libopencm3 and FreeRTOS projects using the STM32F103C8T6 MCU logo

libopencm3 and FreeRTOS projects using the STM32F103C8T6 MCU

Free

Open-source STM32F103C8T6 examples with libopencm3 and FreeRTOS

FreeFree tier
Type
Open Source

About libopencm3 and FreeRTOS projects using the STM32F103C8T6 MCU

This GitHub repository provides a collection of example projects for the STM32F103C8T6 microcontroller using libopencm3 and FreeRTOS. It is the companion source code for the book 'Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC' (ISBN 978-1-4842-3623-9). The top-level directory contains libopencm3-only projects (e.g., miniblink, uart, uarthwfc), while the ./rtos subdirectory holds FreeRTOS-based examples (blinky, uart3, usbcdc). The environment is built entirely with open-source tools (no proprietary IDEs) and is compatible with Cygwin, Linux, macOS, and BSD systems. Prerequisites include an arm-none-eabi cross-compiler toolchain, the st-link flashing utility, and the libopencm3 and FreeRTOS sources. The repository includes a Makefile and linkerscript for easy builds.

Key Features

Ready-to-build example projects for STM32F103C8T6
libopencm3-only projects (miniblink, UART, UART with flow control)
FreeRTOS-based projects (blinky, uart3, USB CDC)
Entirely open-source toolchain (no Windows IDE required)
Cross-platform support (Cygwin, Linux, macOS, *BSD)
Includes Makefile and linker script for easy compilation and flashing
Uses git submodule for libopencm3 dependency management

Pros & Cons

Pros
  • 100% open-source – no vendor lock-in
  • Works on multiple operating systems
  • Clear project structure separating bare-metal and RTOS examples
  • Easy to reproduce with provided Makefiles and detailed README
  • Accompanies a well-regarded book for structured learning
Cons
  • Limited to the STM32F103C8T6 microcontroller (not generic)
  • Requires manual setup of cross-compiler and st-link tools
  • FreeRTOS source must be downloaded separately and extracted
  • No graphical IDE; relies on command-line tools
  • Not a standalone library – primarily a set of examples

Best For

Learning STM32 development with FreeRTOS and open-source toolsRapid prototyping on the STM32F103 platformEducational reference for embedded systems coursesPorting FreeRTOS to STM32-based custom hardwareBuilding USB CDC device examples on STM32

FAQ

What is the purpose of this repository?
It provides source code examples for the STM32F103C8T6 using libopencm3 and FreeRTOS, as used in the book 'Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC'.
What prerequisites are needed to build these projects?
You need an arm-none-eabi cross-compiler toolchain, the st-link flashing utility, and the libopencm3 submodule (fetched via git submodule update). For FreeRTOS projects, you must also download and extract the FreeRTOS sources into the ./rtos directory.
Which operating systems are supported?
Cygwin, Linux, macOS, and BSD environments are suitable.
Does this repository support other STM32 microcontrollers?
The projects are specifically designed for the STM32F103C8T6. They may be adaptable to other parts but are not guaranteed to work without changes.
Is a Windows IDE required?
No. The project intentionally uses only open-source command-line tools; no Windows-based IDE is used or implied.