STMicroelectronics/STM32CubeF4 logo

STMicroelectronics/STM32CubeF4

Free

STM32Cube MCU Full Package for the STM32F4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))

FreeFree tier
Type
Open Source
Company
STMicroelectronics

About STMicroelectronics/STM32CubeF4

STM32CubeF4 is a comprehensive firmware package for the STM32F4 series of microcontrollers from STMicroelectronics. It includes the HAL (Hardware Abstraction Layer) and LL (Low-Layer) drivers, CMSIS Core and Device files, BSP drivers for various ST boards, and a full set of middleware libraries such as RTOS, USB, FatFS, and graphics. The package also provides numerous example projects, applications, and demonstrations that run directly on Nucleo, Evaluation, and Discovery kits. It is part of the STM32Cube initiative to ease development and maximize portability across STM32 devices. The repository is open source but note that some middleware (Audio, STemWin, TouchGFX) are not included due to license restrictions and must be downloaded separately from ST's website.

Key Features

HAL (Hardware Abstraction Layer) and LL (Low-Layer) drivers for STM32F4
CMSIS Core and Device files for ARM Cortex-M4
BSP drivers for evaluation, demonstration, and nucleo boards
Middleware libraries including RTOS, USB, FatFS, graphics, and touch sensing
Full set of software projects: basic examples, applications, and demonstrations
Maximized portability across STM32 portfolio
Open source with git submodule support for easy cloning and updates
Documentation and release notes included

Pros & Cons

Pros
  • Comprehensive and well-structured firmware stack covering drivers, middleware, and examples
  • Free and open source with permissive ST license
  • Portable across multiple STM32 series due to HAL abstraction
  • Large set of ready-to-run projects for various ST boards
  • Active maintenance and community support via GitHub
  • Includes essential middleware like RTOS, USB, and FatFS out of the box
Cons
  • Some middleware (Audio, STemWin, TouchGFX) are not included in the GitHub repository due to license restrictions - requires separate download from ST website
  • Only supports STM32F4 series, not backward compatible with other STM32 families without adaptation
  • Requires STM32 hardware (Nucleo/Eval/Discovery boards) to run the projects
  • Large repository size due to submodules and multiple projects
  • Not an AI tool; focuses on microcontroller firmware development

Best For

Embedded firmware development for STM32F4 microcontrollersRapid prototyping on Nucleo, Discovery, and Evaluation boardsLearning and teaching ARM Cortex-M4 programming and RTOSDeveloping applications with USB, file system, or graphical user interfacesPorting existing STM32F1/F2 code to STM32F4 with HAL abstraction

FAQ

What is included in the STM32CubeF4 package?
It includes HAL and LL drivers, CMSIS Core and Device, BSP drivers, middleware (RTOS, USB, FatFS, graphics, touch sensing), and a set of projects (examples, applications, demonstrations) for STM32F4 series boards.
Are all middleware libraries available in this GitHub repository?
No. Middleware like STM32_Audio, STemWin, and TouchGFX are not included due to restrictive licenses. They can be downloaded from ST's website after accepting a click-through license.
How do I clone this repository with all submodules?
Use the command: git clone --recursive https://github.com/STMicroelectronics/STM32CubeF4.git
Is this package free to use?
Yes, it is open source and free. The license file is included (LICENSE.md) in the repository.