STM32Cube  Version 2.1
Create Projects with STM32Cube HAL and STM32CubeMX
 All Files Pages

This manual explains how to create projects that utilize STM32CubeMX together with Arm Keil MDK, which provides Device Family Packs (DFP) for the STM32 device series. The STM32 DFPs (version 2 or higher) include STM32Cube and a full set of CMSIS-Drivers that provide standardized peripheral interfaces.

Two components located in the class Device component bundle STM32CubeMX are provided:

  • STM32Cube HAL: hardware abstraction layer for STM32 peripherals.
  • STM32Cube Framework:STM32CubeMX: interface component to the graphical software configuration tool that generates the initialization code for STM32 peripherals.
When selecting the component bundle 'Standalone' instead of 'STM32CubeMX' the STM32Cube HAL and LL peripheral interfaces become selectable as individual software components, but there is no component STM32Cube Framework:STM32CubeMX. This means there is no interaction nor integration available with the STM32CubeMX utility. As the CMSIS-Drivers for the STM32 peripherals rely on the peripheral and pin configuration by the STM32CubeMX and source code generated accordingly, CMSIS-Drivers and also MDK-Middleware components cannot be used when the 'Standalone' bundle is selected.

MDK Software Packs for STM32F0/F1/F2/F3/F4/F7, STM32G0/G4, STM32H7, and STM32L0/L1/L4/L5 extend the support for STM32Cube with:

  • CMSIS-Driver: extend the STM32Cube HAL with standardized drivers for middleware and generic component interfaces.
  • Middleware Examples: that demonstrate the features of the MDK-Professional Middleware.

The diagram below is an overview of the complete software stack that is available with Keil MDK:


It is recommended to watch the video tutorials available from ST and Arm on STM32CubeMX:

This manual assumes that you are familiar with Arm Keil MDK. Refer to "Getting Started" for additional information.

Continue with: