STM32CubeMX

Table Of Contents

- STM32CubeMX documentation
- CubeMX User Manual
  - 1 STM32Cube overview
  - 2 Getting started with STM32CubeMX
  - 3 Installing and running STM32CubeMX
  - 4 STM32CubeMX user interface
  - 5 STM32CubeMX tools
  - 6 STM32CubeMX C Code generation overview
  - 7 Code generation for dual-core MCUs (STM32H7 dual-core product lines only)
  - 8 Code generation with TrustZone enabled (STM32L5 series only)
  - 9 Device tree generation (STM32MPUs only)
  - 10 Support of additional software components using CMSIS-Pack standard
  - 11 Tutorial 1: From pinout to project C code generation using an MCU of the STM32F4 series
  - 12 Tutorial 2 - Example of FatFs on an SD card using STM32429I-EVAL evaluation board
  - 13 Tutorial 3 - Using the Power Consumption Calculator to optimize the embedded application consumption and more
  - 14 Tutorial 4 - Example of UART communications with an STM32L053xx Nucleo board
  - 15 Tutorial 5: Exporting current project configuration to a compatible MCU
  - 16 Tutorial 6 - Adding embedded software packs to user projects
  - 17 Tutorial 7 - Using the X-Cube-BLE1 software pack
  - 18 Creating LPBAM projects
  - Appendix A STM32CubeMX pin assignment rules
  - Appendix B STM32CubeMX C code generation design choices and limitations
  - Appendix C STM32 microcontrollers power consumption parameters
  - Appendix D STM32Cube embedded software packages
  - Revision history
- Release Notes
  - Release details
  - Release fixes
  - Known limitations
    - Miscellaneous
    - 2.1. When selecting microcontrollers in the STM32C0 series
    - 2.2. When selecting microcontrollers in the STM32G0 series
    - 2.3. When selecting microcontrollers in the STM32G4 series
    - 2.4. When selecting microcontrollers in the STM32H5 series
    - 2.5. When selecting microcontrollers in the STM32H7 series
    - 2.6. When selecting dual-core microcontrollers in the STM32H7 series
    - 2.7. When selecting microcontrollers in the STM32L5 series
    - 3.4. How to improve the wake-up from Stop sequences without relying on the global SystemClock_Config()
    - 3.3. List pinout-compatible microcontrollers
    - 3.2. DDR binaries for the STM32MP1 boards
    - 3.1. Command line authentication required
    - 2.21. Symbolic links on Ubuntu
    - 2.20. User manual
    - 2.19. DDR test suite
    - 2.18. STM32CubeIDE toolchain
    - 2.13. When selecting microcontrollers in the STM32WL series
    - 2.11. When selecting microcontrollers in the STM32WB series
    - 2.17. When using additional software packs
    - 2.16. When using the Example Selector
    - 2.15. When using the Memory Management Tool
    - 2.14. When selecting microprocessors in the STM32MP1 series
    - 2.11.1. When selecting microcontrollers in the STM32WB0 product lines
    - 2.12. When selecting microcontrollers in the STM32WBA series
    - 2.13.1. When selecting microcontrollers in the STM32WL33 product lines
    - 2.10. When selecting microcontrollers in the STM32U5 series
    - 2.9. When selecting microcontrollers in the STM32U3 series
    - 2.8. When selecting microcontrollers in the STM32N6 series
- Running STM32CubeMX in command-line mode
- FAQ
- Community

# Miscellaneous

- When integrating software packages, please note that the current configuration only allows the selection of one major component at a time. Attempting to select packages like X-CUBE-TOUCHGFX and X-CUBE-TCPP together will be prevented by the package selector.

- An issue can occur with MDK-ARM when the assembly file settings are modified from the “Option for Target” panel. More precisely, when a user adds include paths or defines from that panel, the settings are removed.

  As a temporary workaround, users must manually add include paths or defines for assembly files by following these steps:

  1. Right-click on the assembly file and select “Options for File’startup_stm32XXXxx.s”

  2. Navigate to the Asm tab and add the necessary include paths and/or defines

- Generating an STM32 project with a minimum version of the IAR Embedded Workbench® toolchain creates a permanent association. The user cannot change this minimum version later or regenerate the project.

- For STM32 projects that use ThreadX with the starm-clang compiler, users may encounter build issues when using Expansion Packages that provide X-CUBE-AZRTOS for the following products: STM32G0, STM32G4, STM32H7, STM32H7RS, STM32L4, STM32L5, STM32WB, and STM32WL.

  To ensure ThreadX works correctly with the starm-clang compiler, proceed as follows:

  - Copy “Middlewares/ST/threadx/ports/cortex_m0/ac6” folder from the STM32Cube firmware to the project

  - Update the CMakeLists.txt file under “cmake/stm32cubemx/” by replacing “/gnu/” with “/ac6/”

  - Update the tx_initialize_low_level.S file under “Core/Src/” as illustrated below:

        #if defined (__clang__)                            to be replaced by ==> #if defined (__ARMCC_VERSION)

        #if (defined(__GNUC__) && !defined(__clang__))      to be replaced by ==> #if (defined(__GNUC__) && !defined(__ARMCC_VERSION))

  Only for STM32G0 users, change the following instruction in the tx_initialize_low_level.S:

      .text 32                  to be replaced by ==> .text

- For STM32 products that natively support the ThreadX feature, building projects with ThreadX enabled in low-power support mode by using Makefile or CMake toolchains results in warnings.

- The compare Projects tool cannot compare projects that have the direct memory access (DMA) feature enabled.

- Starting from Ubuntu version 23.10, when the user selects Tools > MCU commercial part number to configure Tools > MCU selector, the CAD viewer does not function.

- If you get a file access error during compilation in a partner IDE (for example, “cannot open source input file”), try moving the project to a shorter path on your disk.

  You can either:

  - Move the entire STM32 package manually, or

  - Move only the example by using the Example Selector in STM32CubeMX and placing it closer to the disk root (to avoid long path issues).

- If the “CAD resources” feature does not work correctly when “Use System Proxy parameters” is selected, try switching to “Manual Configuration of Proxy Server” or “No proxy” instead. You can change this in: [Updater Settings…] > [Connection Parameters].

- When unzipping a package on a macOS® system, use an official macOS® application such as the default graphical archive application, or the ditto tool in the command line:

      $ditto -x -k setupArchive.zip

  When a Linux®-like application is used (such as unzip), the expanded files lose the signature and are not recognized as signed.

- For Keil® MDK users, especially those working with STM32CubeMX-generated projects, note that starting from Keil® MDK v5.37, Arm Compiler 6 (AC6) is now the default toolchain and Arm Compiler 5 (AC5) is deprecated. This change can cause compatibility issues for some STM32 series, including:

  - STM32F x

  - STM32L (0x, 1x, 4x)

  - STM32H7 (2x, 3x, 4x, 5x, Ax, Bx)

  - STM32G x

  - STM32WB (1x, 3x, 5x)

  - STM32MP15x

  With these products, you may see compilation errors when using AC6, including messages indicating that the required Arm Compiler is not available. Workaround:

  - Download Arm Compiler 5 manually from https://developer.arm.com/documentation/ka005198/latest/.

  - Follow the step-by-step instructions available in this guide [1] to add Arm Compiler 5 to Keil® MDK 5.37 or newer.

  - Once installed, select AC5 as the Arm Compiler of your project settings.

Note

[1] Arm and TrustZone are registered trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere.