- Packs
- STM32G4xx_DFP
STM32G4xx_DFP
2.1.0-
Pack Type
Device Support
STMicroelectronics STM32G4 Series Device Support
-
Add to CMSIS Solution
packs:- pack: Keil::STM32G4xx_DFP@2.1.0
Add with cpackget
> cpackget add Keil::STM32G4xx_DFP@2.1.0
Download
Keil.STM32G4xx_DFP.2.1.0.packRepository
STM32G4xx_DFPIntroduction
The STMicroelectronics STM32G4 Series Device Family Pack (DFP) is a CMSIS-Pack that:
- Enables compatible tools with device support.
- Supports Arm Compiler 6 (AC6), GCC, and IAR.
- Contains System View Description (SVD) descriptions of the peripherals.
- Flash algorithms for the on-chip Flash memory.
- Debug configuration information.
CMSIS-Driver Support
This DFP is tested with the CMSIS-Driver_STM32 pack that implements CMSIS-Driver interfaces using a shim layer to the STM32Cube HAL. The following drivers are supported.
- component: CMSIS-Driver:GPIO # GPIO Driver for STM32 devices - component: CMSIS-Driver:I2C # I2C Driver for STM32 devices - component: CMSIS-Driver:SPI # SPI Driver for STM32 devices - component: CMSIS-Driver:USART # USART Driver for STM32 devices - component: CMSIS-Driver:USB Device # USB Device Driver for STM32 devicesCubeMX Support
The device is configured using STM32CubeMX (CubeMX). Refer to CMSIS-Toolbox - Configure STM32 Devices with CubeMX for usage information with csolution projects.
Add this component to your csolution project to connect to CubeMX.
- component: CMSIS:CORE - component: Device:CubeMX # Component that connects to CubeMXImportant Note:
The DFP does not contain Startup and System Configuration files and does not provide the
CMSIS_device_headerprovided by the CMSIS-Core that defines the registers and interrupt mapping. This files are provided by the CubeMX firmware pack. It is therefore mandatory to use CubeMX when using this DFP as it will pull-in these files and make it accessible.Usage in VS Code
The VS Code Arm CMSIS Solution extension lets you run CubeMX from the CMSIS Solution View.
-
In the dialog Create New Solution choose a device or board and select a CubeMX template (which contains the
Device:CubeMXcomponent). -
Use
Run Generatorthat is available for the componentDevice:CubeMXin the CMSIS Solution View. This starts CubeMX and once the configuration is complete, click in CubeMX the buttonGENERATE CODE. The generated code is imported with fileCubeMX.cgen.ymlas shown below.

Note:
Refer to CMSIS-Toolbox - Configure STM32 Devices with CubeMX for usage information. It contains useful hints, for example for the configuration of an RTOS.
Usage in uVision
The uVision lets you run CubeMX from the Manage Run-Time Environment Window.
-
Select a device and enable in the Manage Run-Time Environment Window the components:
-
CMSIS:CORE -
Device:CubeMX -
Use
Launch CubeMXthat is available for the componentDevice:CubeMXin the Manage Run-Time Environment Window. This starts CubeMX and once the configuration is complete, click in CubeMX the buttonGENERATE CODE. The generated code is imported with fileCubeMX.cgen.yml.
