Skip to main content

RAL CMSIS ST

Supported STM32 families: F4 · G4 · H5 · H7 · L4 · U5

Mirror of STMicroelectronics' CMSIS Device Interface package (cmsis-device-<family>), providing device-specific headers, register definitions and system/startup declarations for one STM32 family at a time. Consumed as a git submodule of Bsp-Ral, one branch per STM32 family/release.


Overview​

Upstream projectSTMicroelectronics/cmsis-device-<family> (e.g. cmsis-device-g4)
Role in Bsp-RalHeader-only dependency — provides the per-MCU device headers used by RAL_ST and by the parent build's MCU-define resolution
LicenseSee License.md, unchanged from upstream
Maintenance modelMirrored from upstream per family; not modified locally

⚠️ This repository tracks STMicroelectronics' official CMSIS device sources verbatim. Do not edit its contents directly — device-independent logic belongs in RAL_ST/Port instead.


Branch Structure​

Branch patternPurpose
STM32<family> (e.g. STM32G4, STM32U5, STM32H7)Family branch holding CMSIS device headers for that STM32 family
STM32<family>_<major>.<minor>.x (e.g. STM32G4_1.2.x)Release branch mirroring one specific ST release for that family

Repository Structure​

CMSIS_ST
├── Include
│ ├── stm32g4xx.h # Family dispatcher — selects the exact per-part header
│ ├── stm32g411xb.h # Per-part-number device header (register/interrupt definitions)
│ ├── stm32g411xc.h
│ ├── stm32g414xx.h
│ ├── ... # One header per part number in the family
│ └── system_stm32g4xx.h # System/clock initialization declarations
├── Source # System initialization sources (system_stm32g4xx.c, startup files)
└── License.md

(File names above are the actual STM32G4 family branch contents; other family branches follow the same Include/Source layout with their own family's headers, e.g. stm32u5xx.h.)


Usage​

This repository is not built as a standalone CMake project when used as a submodule of Bsp-Ral — it only supplies headers. Bsp-Ral's CMakeLists.txt adds CMSIS_ST/Include to both of its library targets (HAL_LL_Lib and Ral_Lib):

target_include_directories(Ral_Lib
PUBLIC
...
${CMAKE_CURRENT_SOURCE_DIR}/CMSIS_ST/Include # ST CMSIS Device files
)

The parent build (Build.cmake) additionally parses the family dispatcher header (e.g. stm32g4xx.h) at configure time, extracting its #if/#elif defined(STM32...) chain to resolve the exact device define (e.g. STM32G411xB) for the target part number — so a part number missing from this header fails the CMake configure step with a clear error rather than a wall of downstream compiler errors.


License​

Distributed under the terms in License.md, unchanged from the upstream STMicroelectronics CMSIS device package.