Unofficial mirror of stm32lib
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Damien George 0cbbf16b42 README: Update to include L1 series support. 6 days ago
CMSIS Import STM32CubeL1 v1.10.3 on 08-Jun-2021. 6 days ago
STM32F0xx_HAL_Driver Import STM32Cube_FW_F0_V1.9.0 on 25-Aug-2017 4 years ago
STM32F4xx_HAL_Driver Import STM32Cube_FW_F4_V1.16.0 on 14-Apr-2017 5 years ago
STM32F7xx_HAL_Driver Import STM32Cube_FW_F7_V1.7.0 on 14-Apr-2017 5 years ago
STM32G0xx_HAL_Driver Import STM32CubeG0 v1.5.1 on 08-Apr-2022. 5 months ago
STM32G4xx_HAL_Driver Import STM32CubeG4 v1.3.0 on 29-Jul-2020. 2 years ago
STM32H7xx_HAL_Driver Import STM32Cube_FW_H7_V1.6.0 on 02-Dec-2019. 3 years ago
STM32L0xx_HAL_Driver Import STM32Cube_FW_L0_V1.11.0 (with patch to 1.11.2) on 30-May-2019 3 years ago
STM32L1xx_HAL_Driver Import STM32CubeL1 v1.10.3 on 08-Jun-2021. 6 days ago
STM32L4xx_HAL_Driver Import STM32CubeL4 v1.17.0 on 03-Mar-2021. 10 months ago
STM32WBxx_HAL_Driver Import STM32CubeWB v1.10.0 on 04-Dec-2020. 2 years ago
STM32WLxx_HAL_Driver Import STM32CubeWL v1.1.0 on 22-Jul-2021. 10 months ago README: Update to include L1 series support. 6 days ago Explicitly set LC_CTYPE=C. 10 months ago

STM32 Cube library - CMSIS and HAL for F0, F4, F7, G0, G4, H7, L0, L1, L4, WB and WL microcontrollers

This repository contains a copy of STMicroelectronic's STM32 Cube firmware library, with CMSIS-device and HAL code for STM32F0xx, STM32F4xx, STM32F7xx, STM32G0xx, STM32G4xx, STM32H7xx, STM32L0xx, STM32L1xx, STM32L4xx, STM32WBxx and STM32WLxx microcontrollers. Minor changes are applied to the HAL source to support MicroPython's port to the STM32.

The "vendor" branch contains the original sources and is updated from time-to-time when new versions become available. The upstream sources are provided as separate releases (and in separate archives) for each microcontroller class (eg F4, F7, L4). These are merged together here in the "vendor" branch, because the idea of the HAL code is that it provides a uniform interface to all microcontroller classes. The commits in the "vendor" branch are tagged as appropriate with a tag that describes all the available versions at that commit, for example F4-1.5.0+F7-1.1.0+L4-1.3.0.

There are then working branches that branch at a given vendor tag and apply minor patches to the vendor code, for example work-F4-1.5.0+F7-1.1.0+L4-1.3.0. The patches/commits that form a given working branch are reapplied (with conflict resolution) to newer vendor tags to create the next working branch.

Original sources

The sources are obtained from, and also from the git repositories found at

For all .c and .h files the following processing has been done to the original files before committing them here:

  • lines endings changed to unix style
  • trailing spaces removed
  • tabs expanded to 4 spaces
  • non-ASCII chars converted to their ASCII equivalent

Directories from the original sources are mapped into this repository according to the following:

Drivers/STM32F4xx_HAL_Driver/Inc ->          STM32F4xx_HAL_Driver/Inc
Drivers/STM32F4xx_HAL_Driver/Src ->          STM32F4xx_HAL_Driver/Src
Drivers/CMSIS/Device/ST/STM32F4xx/Include -> CMSIS/STM32F4xx/Include
Drivers/CMSIS/Device/ST/STM32F4xx/Source  -> CMSIS/STM32F4xx/Source

And similar for the other microcontroller classes.

The included script can automatically copy and process new source code from an STM git repository.