STM32CubeF4: STM32F4 firmware package and board projects
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))
At a glance
- What is it?
- STM32CubeF4 is a C firmware package for STM32F4 development, combining CMSIS, HAL and LL drivers, middleware, board support, and example projects. It is a practical choice for teams that want ST's board-oriented examples, but its submodule workflow and licensing differences require attention before adoption.
- Who is it for?
- STM32CubeF4 fits engineers building for STM32F4 boards who value vendor-maintained drivers and board projects, especially when they can manage Git submodules and inspect the custom LICENSE.md. It is less suitable for developers who need one self-contained download or unrestricted access to the missing middleware.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 18 days ago.
- What is it written in?
- Mainly C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What STM32CubeF4 contains
STM32CubeF4 addresses a specific embedded software problem: providing a coordinated firmware foundation for STM32F4 microcontrollers rather than requiring developers to assemble CMSIS files, hardware drivers, board support, and sample applications independently. The intended users are C developers working directly with STM32F4 devices, including engineers using Discovery, Nucleo, Evaluation, and demonstration boards.
The repository contains several layers. CMSIS provides the core and device components corresponding to the Arm core used by the STM32 product. The STM32 HAL-LL drivers provide APIs intended to improve portability across STM32 products. Board-specific BSP drivers cover evaluation, demonstration, and Nucleo boards. Middleware directories contain components such as RTOS, USB, FatFS, graphics, and touch sensing libraries, although not every component is included in this GitHub repository.
The Projects directories contain basic examples, applications, and demonstrations associated with boards. This combination makes the package useful for both an initial hardware bring-up and later development. It is not, however, a small single-driver repository. Its scope is the wider STM32F4 software environment, including board-specific assumptions and multiple abstraction layers. That breadth also means a team must select the relevant board project rather than treat the repository as a universal application template.
HAL, LL, CMSIS, and BSP boundaries
The documented architecture separates common Cortex-M and device support from ST-specific drivers and board integration. CMSIS supplies the core and device modules, while HAL-LL supplies the STM32 driver APIs. BSP drivers sit at the board level, so examples can depend on the peripherals, LEDs, buttons, displays, and interfaces exposed by a particular board.
That separation changes how code should be evaluated. An example written for an STM32F4 board may include board initialization and pin configuration that cannot be copied directly to a custom PCB. The HAL layer is intended to provide a higher-level API surface, while LL is presented as part of the same driver package. The README does not document the internal call path for a particular example, so it would be inaccurate to claim that every project uses both layers or that HAL always delegates to LL in the same way.
The package also includes middleware and projects for areas such as USB, file systems, graphics, and touch sensing. Those components can reduce the amount of peripheral and board code an application needs to write, but the README warns that several libraries and dependent projects are unavailable in this repository. The repository therefore needs to be assessed as a framework with selective omissions, not as a guarantee that every advertised example can be cloned and built immediately.
Cloning STM32CubeF4 with its submodules
The repository was created with Git submodules, so a normal shallow or non-recursive copy is not the documented setup. The first command retrieves the repository and its linked submodules. Run it from a directory where the STM32CubeF4 tree is wanted.
git clone --recursive https://github.com/STMicroelectronics/STM32CubeF4.gitAfter cloning, the relevant content should appear in the top-level areas named `Drivers`, `Middlewares`, `Projects`, and `Utilities`, together with the linked submodule content. The README does not document a board flashing procedure or a universal build command, because the available projects target different boards and tool configurations. A first real use begins by choosing the matching board directory under `Projects/`, then inspecting its project files and README.
For an existing checkout, the documented update sequence pulls the main repository and initializes or updates all submodules. The order matters because a successful `git pull` does not by itself fetch missing submodule content.
git pull
git submodule update --init --recursiveIf the desired firmware version must match a specific version available through ST's distribution channels, the README instructs the developer to replace `vX.Y.Z` with the target tag. The example is intentionally a placeholder, not a literal version to copy unchanged.
git checkout vX.Y.ZThe project can also be cloned directly at that tag with a shallow history. The `--depth 1` option is optional according to the README.
git clone --recursive --depth 1 --branch vX.Y.Z https://github.com/STMicroelectronics/STM32CubeF4.gitUsing GitHub's ZIP download requires manually collecting and adding the submodules. For repeatable builds, the recursive Git commands are the documented path.
Board projects and the missing middleware boundary
The README lists boards including STM32F4-Discovery, STM32F401-Discovery, STM32F401RE-Nucleo, STM32F410xx-Nucleo, STM32F411E-Discovery, STM32F411RE-Nucleo, STM32F412G-Discovery, STM32F412ZG-Nucleo, STM32F413H-Discovery, STM32F413ZH-Nucleo, and STM32F429I-Discovery. The package therefore gives a developer a board-oriented starting point when one of those supported setups matches the target hardware.
The boundary becomes important for projects that depend on the unavailable middleware. The README specifically names `./Middlewares/ST/STM32_Audio`, `./Middlewares/ST/STemWin`, and `./Middlewares/ST/TouchGFX`, along with a related list of demos, applications, and examples. It says those libraries are subject to restrictive license terms and require approval through a click-through procedure. They may instead be obtained in the full firmware package from ST's website, with account registration or login potentially required.
This restriction means a project can appear in the repository's broader structure while its required software is not present in the Git clone. That is a genuine failure mode for an automated build system, a new contributor, or a team that assumes every path under `Middlewares/` is populated. The project is also a poor fit for a product review that treats ST's full downloadable package and this GitHub repository as identical artifacts. The full package and repository have different content boundaries.
Versioning, licensing, and maintenance costs
Version selection is part of the operating model. The README warns that the GitHub version may be ahead of the version available on `st.com` or through STM32CubeMX because GitHub uses a rolling release process. Teams that need a repeatable firmware baseline should record the selected tag or commit and use that same baseline across the application and its submodule updates. A plain update to the default branch can change the inputs without providing a semantic version choice.
The repository has no GitHub releases, so release discovery depends on tags, the linked `Release_Notes.html`, and repository history. The README provides a direct link to the release notes but does not describe an automated changelog or compatibility matrix in the visible instructions. Reviewers should therefore compare the relevant release note and board project before adopting a version.
The repository identifies its license as a custom license that GitHub cannot classify, with the terms in `LICENSE.md`. Some components also have separate or more restrictive terms, especially the middleware identified as requiring approval. This is not legal advice. It does mean that an engineering team must inspect `LICENSE.md` and the terms for every middleware component before deciding whether the package can be redistributed or incorporated into a commercial product.
The repository is not archived, and the last push was on 2026-10-05. The package therefore has recent repository activity at the stated date, but its rolling versions and external middleware distribution still create upgrade work. Teams should budget for checking submodule changes, board-project compatibility, and license conditions when moving between firmware versions.
STM32CubeF4 versus the full ST firmware package
The direct alternative described by the README is ST's full firmware package download from `st.com`. The GitHub repository provides the CMSIS, HAL-LL, BSP, middleware, and project structure through a Git checkout with submodules. The full package is the stated source for unavailable middleware such as `STM32_Audio`, `STemWin`, and `TouchGFX`, and it may provide a version aligned with ST's published distribution rather than the latest GitHub state.
The approach differs in distribution and versioning. Git supports selective history, tags, submodules, and update commands. The full package is obtained as a downloadable firmware package and requires access to ST's site, potentially including account registration or login. A team that already manages firmware as reproducible Git dependencies may prefer STM32CubeF4 for the repository-based workflow. A team that needs the omitted middleware or wants the package version matching a specific ST distribution may need the full download instead.
Neither choice removes hardware validation. A board project still has to match the physical board, and the documentation does not claim that every repository project builds in one common environment. The meaningful comparison is therefore about access, version control, and component coverage, not about a claim that one package has better drivers.
Editorial conclusion
STM32CubeF4 fits engineers building for STM32F4 boards who value vendor-maintained drivers and board projects, especially when they can manage Git submodules and inspect the custom LICENSE.md. It is less suitable for developers who need one self-contained download or unrestricted access to the missing middleware. Before adopting it, verify the exact board directory, required submodule contents, available middleware, and the licensing terms for the components in the intended product.
Frequently asked questions
How do I clone STM32CubeF4 with all required submodules?
Use `git clone --recursive https://github.com/STMicroelectronics/STM32CubeF4.git`, as documented in the README. The recursive option is necessary because the repository is organized with Git submodules.
Which STM32CubeF4 middleware is unavailable in the GitHub repository?
The README names `./Middlewares/ST/STM32_Audio`, `./Middlewares/ST/STemWin`, and `./Middlewares/ST/TouchGFX`. These libraries, and dependent projects, require approval and are available through the full firmware package from ST's website.
Can I use the latest STM32CubeF4 GitHub version to match ST's website?
Not automatically. The README says the GitHub version may be ahead of the version on `st.com` or through STM32CubeMX because GitHub uses a rolling release process. To select a matching tag, use the documented `git checkout vX.Y.Z` command after replacing the placeholder with the target version.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/stmicroelectronics-stm32cubef4)Was this useful?