Ask questions about STM32CubeMX2. Discuss code generation and configuration challenges, as well as other relevant topics.
Most recent activity
Dear ST Community members, At the moment, STM32CubeMX2 uses the latest packs available on the public server.A script is available for a specific use case if you prefer not to start a project with the most recently published pack version.This script can be used when a project needs to be created or maintained with the STM32C5 v2.0.0 packs, instead of the most recent version available.If this matches your situation, feel free to use the script as an alternative.Where to get the script: check How to start with previous versions of HAL2 For more details on how to use it, please check the README. If you have any feedback, please don’t hesitate to share it with us in the: STM32CubeMX2 (MCUs) - STMicroelectronics Community The STM32CubeMX2 Team
We’re happy to announce that STM32CubeMX2 v1.1.0 has been released and is now available. This release includes updates and improvements aimed at enhancing the user experience and supporting your development workflow with STM32. What’s new Enhanced installation support for multiple STM32CubeMX2 versions, including linked IOC2 files and a pinned icon on the Windows taskbar Added Expand All and Collapse All functions in software configuration panels Added confirmation dialog boxes for selected actions Added options to export the pinout as CSV from a menu: without alternate functions or with alternate functions Added pin labels that can be used from configuration panels Improved command-line interface (CLI) capabilities for software configuration Added a pack version compatibility check Added end-user guidance to run Pack update steps in the correct order, with a focus on device family pack (DFP) and hardware abstraction layer (HAL) packs Increased pin name visibility in the pinout view to
Hello everyone, I’ve been working for a few weeks on a TouchGFX project using a MCU that is working with CubeMX2, so I used the documentation (Using TouchGFX with STM32CubeMX2 | TouchGFX Documentation) to setup my project, which is working.However I tried to add an SVG Image and then I got the “undefined reference to ‘touchgfx::VectorRenderer::getInstance()’” issue. Normally this issue can be resolved by enabling vector rendering in CubeMX, but because I’m on CubeMX2 it’s not possible in my case.Is there any way to enable vector rendering manually ? Also just to be sure it wasn’t already activated I tried to put a SVG image with the example project that I started with (the NUCLEO-C5A3ZG + RVA15MD project), and I got the same error.MCU used is STM32C552RET6.
Finally was able to test STM32CubeMX2 with a NUCLEO-C562RE board.Simple LED blinking project, and here's what I found out. Project bloat:STM32CubeMX2: 26.2 MB of generated data and when compiled 41.1 MB (NUCLEO-C562RE)STM32CubeMX: 4.6 MB generated and compiled 15.7 MB (NUCLEO-C031C6, same functionality) The old STM32CubeMX included only the HAL libraries actually used.The new one dumps everything in.That's a 5.7x increase for a blink LED. Missing Release configuration:Generated CMake project contains only Debug configuration - No Release.Interesting, because the official "MOOC STM32CubeMX2" video at 4:53 clearly shows both configurations.Either something changed or the video is misleading. Creating Release configuration manually requires editing multiple CMake files, including inside the cmake folder — supposedly overwritten on regeneration (in practice, changed only at project creation).Not trivial if you're not a CMake expert.I did it once manually, but then ended up using Claud
Hi Team,I am using the STM32C542RC on the STM32C5 Nucleo-64 board (MB2213),What is the max. supported baud rate for the USART baud rate?We have checked that, with STM32CubeMX, the DIV1 prescaler, and oversampling by 16, the maximum supported USART baud rate is 9 Mbit/s, assuming the peripheral clock is configured appropriately.However, in our setup, we are receiving garbage/corrupted data at 1.5 Mbit/s. Communication works correctly at 1 Mbit/s (TX and RX both working at this baud rate), but increasing the baud rate to 1.5 Mbit/s or higher in that case results in receiving garbage/invalid data. The STM32 receiver and the sender are configured with the same UART settings:Baud rate: 1.5 Mbit/sStop bits: 1 (also tested with 2)Parity: NoneWord length: 8 bitsHardware flow control: None Please check the above configuration and let us know how to achieve reliable data on the receiving end at a 1.5 Mbps or higher baud rate. If any additional configuration is required, then please let us know.
I previously got CDC via USBX and FreeRTOS working on a custom C542 design, using the examples since CubeMX2 did not support the USBX middleware at that time.I am now trying to port that code to the C562 since I need more memory. This does not work at the moment since I used CubeMX2 for the USBX configuration and setup.So I thought, lets have a look into the examples and see what I am doing wrong.Unfortunately that did not work, or rather the USBX-CDC-FreeRTOS example for the Nucleo-C562RE board using the CMake toolchain does not work.I got "example_usbx_device_cdc_acm_uart_freertos" from "https://dev.st.com/stm32-example-library" for the CMake toolchain.I extracted the ZIP and imported the project in the latest CubeIDE (version 2.2.0; Silicon MAC) and build the project in "release" and "debug" config without errors.However, both version do not setup the USB stack correctly. The user-LED stays on, so everything should run without errors.If I look at the USB communication with a Total P
@lbthomsen of STM32World has published a review of the new STM32CubeMX2, what is good (not so much), indifferent and BAD (a lot). He tries to get it working, browse through the features, and has a lot of opinion on this matter. https://www.youtube.com/watch?v=61r83TTzDfk End of the day, IF you plan to use future STM32 families (starting with STM32C5) you have no choice than to use CubeMX2 AND the very painful migration from HAL to HAL2 (not compatible, maybe some future tool can assist in such migration). Even if migration is possible, then you will have the pleasure to support multiple versions of YOUR code on old vs new MCU families. Have FUN. For the people without perfect vision (like myself), embrace yourself for 4 pixels font sizes, and contrast-free dark-white-on-white-backgrounds text. Lovely! At least there is plenty of white space around the text that can sooth your soul. Now is the best time for experienced STM32 shops to leave HAL, CubeMX and go Bare
Even when running stm32cubemx2-1.0.1-X64-Windows-installer.exe as Admin: Failed to add cube-wrapper to PATH: Could not create / read registry 'HKEY_LOCAL_MACHINE\Environment': The parameter is incorrect. (0x80070057) On Windows 11 Pro Installing to C:\Program Files\STMicroelectronics\STM32Cube\MX2\1.0.1
Hi,I am working on a new Project for the STM32C562MET6 with STM32CubeMX2 and VS Code.On the first run of toolchain generation, CubeMX generates all expected folders like arch, generated, stm32c5xx_dfp and stm32c5xx_drivers.But I dont want to version all files if they can be generated so i added the folders above to the .gitignore file.After running it a second time but with those folders missing, CubeMx2 doesnt generate it. I already tried to set the “conflict handling rules” to override. Any suggestions?
In a project using FreeRTOS, we had the choice in STM32CubeMX to check a box in the NVIC panel “Uses FreeRTOS functions”, see here: I would love to have this feature available in STM32CubeMX2 as well, because by default the interrupt priorities are set to 0, and therefore need to be manually set to configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY (usually = 5) in order to use FreeRTOS API in those ISRs.
OverviewIn traditional STM32 development, we typically use STM32CubeMX to configure the USART peripheral and redirect printf() to the serial port for debugging output. With the STM32C5 series, ST introduces the new STM32CubeMX2 configuration tool and the HAL2 driver framework. Compared with the legacy HAL, the project structure and some API names have changed, so the UART configuration process and application code require slight modifications accordingly. Hardware PreparationFirst, prepare a development board. In this tutorial, I use a custom-designed development board. If you are interested in obtaining one, you can apply for a sample.The main controller is the STM32C542CCT6. Reference ProjectThe reference project is available on GitHub:https://github.com/CoreMaker-lab/STM32C542_SENSOR Creating a Project with STM32CubeMX2Use STM32CubeMX2 to generate the example project. The MCU used in this tutorial is the STM32C542CCT6. Open STM32CubeMX2 and go to the Home page. Click MCU to creat
OverviewIn the previous experiment, TIM1 was used to generate PWM output, and the PWM frequency and duty cycle were controlled by modifying the PSC, ARR, and CCR values.Building on that experiment, this article uses the TIM15 input capture function to measure the PWM signal generated by TIM1, thereby detecting its frequency and duty cycle. Hardware PreparationFirst, prepare a development board. In this tutorial, I use a custom-designed development board. If you are interested in obtaining one, you can apply for a sample.The main controller is the STM32C542CCT6. Reference ProjectThe reference project is available on GitHub:https://github.com/CoreMaker-lab/STM32C542_SENSOR UART ConfigurationRefer to the schematic and note that PA9 and PA10 are connected to the UART interface on the development board. In the Peripherals panel, navigate to Connectivity → USART1. Set Mode to Async to configure USART1 for asynchronous communication. Verify that Function used by the component is d
OverviewTimers are among the most commonly used peripherals in an MCU. They can be used for periodic timing, PWM generation, input capture, output compare, motor control, and many other applications.This tutorial is based on the STM32C542CCT6. It uses STM32CubeMX2 to configure TIM1 and demonstrates how to modify the prescaler (PSC) and auto-reload register (ARR) using the built-in HAL2 functions, thereby changing the timer output frequency. It also introduces the basic usage of multi-channel PWM output. Hardware PreparationFirst, prepare a development board. In this tutorial, I use a custom-designed development board. If you are interested in obtaining one, you can apply for a sample.The main controller is the STM32C542CCT6. Reference ProjectThe reference project is available on GitHub:https://github.com/CoreMaker-lab/STM32C542_SENSOR Creating a Project with STM32CubeMX2Use STM32CubeMX2 to generate the example project. The MCU used in this tutorial is the STM32C542CCT6. Open STM32Cub
I have loaded the pack for CMSIS and CMSIS-DSP using the Pack Manager in STM32CUBEMX2. However, when generating code in the Project Settings, the CMSIS appears in the Packs Section and is generated in my project directory but the CMSIS-DSP does not appear in the Packs Section and is not generated. I want to use the DSP features but not able to. Any advice?
Hi I recently started using CubeMX2 and my board is the Nucleo-C542RC. The issue is: I'm trying to use a timer interrupt, but the IRQ Handler doesn't seem to trigger when using the IAR toolchain. (The timer value itself increases normally when I use 'get Value', so the timer peripheral is working). However, it works perfectly when I use CMake. Are there any additional settings I should check in the configuration? Here’s my Main and Timer code : Main :/** ****************************************************************************** * file : main.c * brief : Main program body * Calls target system initialization then loop in main. ****************************************************************************** * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with th
Hi,I found the new c562 chip and for that I needed to install the latest IDE, v2.1.1I am running Debian linux (testing) kernel 7.0.10 on an AMD cpu with nvidia, driver 595.80When I installed IDE 1.19 it installed mx1 automagically if I am correct, now with 2.1.1 mx1 or mx2 is no longer automagically installed anymore. Trying to install mx1 from the command line throws an error that I do not have JRE 17 installed even though versions 17/21/25 are installed.rth@castle:~$ uname -aLinux castle 7.0.10+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.0.10-1 (2026-05-27) x86_64 GNU/Linuxrth@castle:~$ java --versionopenjdk 25.0.3 2026-04-21OpenJDK Runtime Environment (build 25.0.3+9-2-Debian)OpenJDK 64-Bit Server VM (build 25.0.3+9-2-Debian, mixed mode, sharing)rth@castle:~$ dpkg -l | grep jreii default-jre 2:1.25-77 amd64 Standard Java or Java compatible Runtimeii default-jre-headless 2:1.25-77 am
Hello, I was wondering where the installed software packs are stored on the disk? I would like to have a look at the content and the examples, assuming e.g. the HAL pack or the Nucleo board pack contains these examples.
Hi all,I am wondering if CubeMX2 + STM32C562RE are able to support cpp main applications? Thanks in advance
OverviewIn practical project development and mass-production maintenance, in addition to using ST-LINK for programming, firmware updates are often performed through interfaces such as USART, USB DFU, SPI, or FDCAN. In these cases, the MCU must first enter the factory-programmed System Memory Bootloader before the Flash memory can be programmed through these interfaces. For the STM32C5 series, whether the external BOOT0 pin is used to enter the Bootloader is closely related to the BOOT_SEL setting in the Option Bytes.Simply put, BOOT_SEL is used to select the source of the BOOT0 signal. When BOOT_SEL enables the external BOOT0 pin, the MCU can enter the System Memory Bootloader by pulling BOOT0 high and resetting the device. When BOOT_SEL selects the internal Option Bit, the boot mode is determined by the BOOT0 configuration in the Option Bytes. Therefore, understanding the relationship between BOOT_SEL, the BOOT0 pin, and the System Memory Bootloader is important for subsequent firmwar
OverviewThe STM32C542 & SENSOR is an evaluation kit based on the STM32C5 series microcontroller. Built on ST's 40 nm process technology, the STM32C5 offers faster Flash access, higher performance, and lower power consumption.The board also features a rich set of peripherals and interfaces, including dedicated connectors for the ST MEMS sensor (SENSOR) series, providing developers with a convenient and flexible platform for rapid prototyping and application development.In this tutorial, we will perform a simple LED blinking test by configuring a GPIO pin as an output.Hardware PreparationFirst, prepare an STM32C542 development board. In this tutorial, I will use a custom-designed development board. If you are interested in using the same board, feel free to contact me for samples.Main MCU: STM32C542CCT6Reference ProjectThe complete project source code is available on GitHub :GitHub: https://github.com/CoreMaker-lab/STM32C542_SENSOR Creating a Project with STM32CubeMX 2This tutorial u
If I copy the MCU part number from the NUCLEO-C5A3ZG Product Page and paste into CubeMX2, it gets a trailing space - and says “No available options”: Removing that space does then give a list of 2 devices: It really should be able to cope with trimming whitespace from the input box!
Searching for “STM32C5A3ZG” (the part number stated on the NUCLEO-C5A3ZG Product Page), CubeMX v1.0.1 offers STM32C5A3ZGT6 and STM32C5A3ZGT7 The latest Datasheet (DS15137, Rev 2) does not list STM32C5A3ZGT7 as a valid ordering code, but it does have STM32C5A3ZGT3 - which is not in the CubeMX2 list::
Hello,I generated a project using STM32CubeMX2 for Nucleo-C5A3ZG and I imported the project using the 'STM32CubeMX2 Project' option into STM32CubeIDE. I can compile and link the code without any issues however I noticed that there is only one build configuration (debug_GCC_NUCLEO-C5A3ZG for my project). Can STM32CubeMX2 also create a release build configuration?My second related question what is the best way to add compile flags? I managed to add a -DDEBUG flag to the flags.cmake file and it works fine. Is this the right way to do it? Would project regeneration be troubled by this change?Finally, if I opted in for 'Assert checks on function parameters' and 'Assert checks on module state' in STM32CubeMX2 HAL System Init is there a way to only have this functionality enabled only for a debug build? Thank you,Gil
I’ve started from the LWIP TCP echo server with FreeRTOS example from ST and have made a *.ioc2 file to support that example. The issue is that I’m starting from the NUCLEO-C5A3ZG (which I’ve configured the *.ioc2 project), but intend to use a STM32C593 in my final product. My understanding was that STM32CubeMX would allow switching microcontrollers, but keeping the similar configuration settings (e.g. LWIP, FreeRTOS, etc.). I’d like to have the project required configuration settings managed in a tool like CubeMX2, but this will not be possible/feasible if I can’t make changes without having to start completely from scratch every time we make a change. Is there a setting somewhere that I’ve missed to allow switching processors? Is this a planned feature that may not yet be released? Thanks in advance.
I am working with an STM32C542 processor using STM32CubeMX2 and the new HAL2 library framework. CubeMX2 generated the code and I imported the CMake project into STM32CubeIDE v 2.1.1.I am trying to configure Timer 2 for a basic 1-second interrupt to toggle an LED, but the callback function is never reached. Here is the initialization generated by CubeMX2 in mx_tim2.c:/* Includes ------------------------------------------------------------------*/#include "mx_tim2.h"/* Private typedef -----------------------------------------------------------*//* Private define ------------------------------------------------------------*//* Private macro -------------------------------------------------------------*//* Private variables ---------------------------------------------------------*//* Private functions prototype------------------------------------------------*//* Exported variables by reference--------------------------------------------*/static hal_tim_handle_t hTIM2;//HAL_TIM_RegisterUpd
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.