Arm Keil MDK v6 Essential and Professional editions are now available to buy as monthly or annual subscriptions from our Developer Tools store. Visit the store to get access to the tools suite today!

  1. Packs
  2. STM32L4xx_DFP

Introduction

The STMicroelectronics STM32L4 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:MCI              # MCI 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 devices
  - component: CMSIS-Driver:USB Host         # USB Host Driver for STM32 devices

CubeMX 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 CubeMX

Important Note:

The DFP does not contain Startup and System Configuration files and does not provide the CMSIS_device_header provided 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:CubeMX component).

  • Use Run Generator that is available for the component Device:CubeMX in the CMSIS Solution View. This starts CubeMX and once the configuration is complete, click in CubeMX the button GENERATE CODE. The generated code is imported with file CubeMX.cgen.yml as shown below.

VS Code - CubeMX Integration

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 CubeMX that is available for the component Device:CubeMX in the Manage Run-Time Environment Window. This starts CubeMX and once the configuration is complete, click in CubeMX the button GENERATE CODE. The generated code is imported with file CubeMX.cgen.yml.

uVision - CubeMX Integration