stm32_samples logo

stm32_samples

Free

Open-source sample code collection for STM32 microcontrollers

FreeFree tier
Type
Open Source

About stm32_samples

stm32_samples is an open-source collection of sample code for various STM32 microcontrollers, maintained by dwelch67 on GitHub. It includes bootstrapping examples, peripheral initialization, and basic firmware for a wide range of STM32 development boards, such as Nucleo, Discovery, and custom PCBs like the Black Pill. The code is written primarily in C, with Makefile build support and some Assembly and Ada components. The repository serves as a practical reference for embedded developers learning or working with STM32 processors.

Key Features

Covers multiple STM32 families: F0, F1, F2, F4, F7, G0, G7, L0, L1, etc.
Supports popular boards: Nucleo, Discovery, Black Pill, and custom PCBs
Examples include boot code, GPIO, UART, and other peripherals
Build system using Makefile and GNU toolchain
Contains both C and Assembly source code
Some Ada examples for select targets

Pros & Cons

Pros
  • Open source and freely available on GitHub
  • Broad hardware support across many STM32 variants
  • Uses standard toolchains (GCC, Make) making it easy to build
  • Includes low-level assembly examples for understanding MCU internals
Cons
  • No official documentation or user guide provided in the repository
  • Repository appears to be a personal collection with minimal maintenance
  • Examples may lack explanation or comments for beginners
  • No releases or versioned packages; code is used directly from master branch

Best For

Learning STM32 microcontroller programming and embedded firmware developmentQuick prototyping and testing on various STM32 hardware platformsReference for bootstrapping new STM32 projectsEducational material for embedded systems courses

FAQ

What is stm32_samples?
It is a GitHub repository by developer dwelch67 containing sample source code for various STM32 microcontrollers. The code covers many different STM32 families and development boards.
Which STM32 boards are supported?
The repository includes samples for Nucleo boards (e.g., F030R8, F401RE, F767ZI), Discovery kits (STM32F0, F7, L0), and custom boards like the STM32F401CCU6 Black Pill, as well as many standalone MCU packages.
Is stm32_samples free to use?
Yes, the repository is public on GitHub and the code is open source, available at no cost.
What programming languages are used?
The code is predominantly C (73%), with Makefile (17%) build scripts, some Assembly (9%), and a small amount of Ada (0.6%).