Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I am using the latest MDK-ARM Tool Chain (5.43a), and CubeMX is 6.15. So far, I have used Cubex to generate the initialisation and peripheral codes, middleware, etc., compiling them using KEIL. It is perfect and never seen any issues.I want to use middleware from MDK-ARM instead of Cubex. I followed the manual online at the KEIL/ARM site as well as on ST for RTE and CubeMx Integration. It is not clearly defined; should I run CubeX from the RTE of KEIL, or can CubeMX run independently and create the init code?I get the following errors:Error instantiating RTE componentsError #545: Required input file from generator CubeMX: 'E:/STM32CubeMX/Target_1/GSN_Controller_RevC.cgen.yml' is missingCreating E:GSN_Controller_RevC.Target_1.cbuild-gen.ymlCreating E:/Target_1.cbuild-gen-idx.ymlLaunching CubeMXARM\cmsis-toolbox\bin\cbridge.exe E:\Target_1.cbuild-gen-idx.ymlError: generator 'CubeMX' missing. Install from 'https://www.st.com/en/development-tools/stm32cubemx.html#st-get-software'As pe
Hello,I was using the STM32CubeMX across various MCUs and wanted to know is there a way to generate a report of the total and unused goios with names? from the current ioc or current project .it should show the GPIOS used and for which peripherals and possibly any warnings for the conflicting GPIOS ?regards,D
Dear ST,This has been reported in other posts before, but I would like to make a clear suggestion.The problem is that IOC file changes are hard to merge in Git (or in other SCM) with diff tools because:Some parameter names use indexing. Inserting something means changes on following lines.Some parameter values are lists of items on a single line. It is painful to merge 1000 characters long line.It is not intuitively clear what some parameters mean. There's no grouping or context. Risk of making bad merge.Therefore I make a suggestion to switch over to a file format that is still human readable, has a hierarchical structure and is source code tools friendly. It would be even better if it is based on some existing widespread format so developers can build their own development tools to parse or create IOC and use it as a SSOT (single source of truth) or as an output from other SSOT system.Two such standards come to my mind: YAML and JSON.I wouldn't recommend XML because of tedious end ta
Hi, When will the announcement in the link below come into effect? Will there be a version of STM32CubeMX that will generate a project including the LwIP, FreeRTOS, and Filex libraries for the STM32H5? https://community.st.com/t5/developer-news/new-strategic-directions-for-stm32cube/bc-p/804011#M126 Ari
When using USART2 on the C071, CubeMX is generating calls to functions like `HAL_UARTEx_SetTxFifoThreshold` but the USART2 on C071 is a basic UART without FIFO.
Yesterday I've switched from v6.13.0 to v6.14.1 and noticed that the new version changes the way cmake/stm32cubemx/CMakeLists.txt generated. Previously generated CMake list had relative paths like ../../Src/main.c, which works perfectly in both cases when CMakeLists.txt in root directory of project (the one generated by CubeMX) is the top-level CMake list and when it's not. But now (not sure from version 6.14.0 or 6.14.1) paths to files generated by CubeMX become absolute and use CMAKE_SOURCE_DIR variable as prefix directory (e.g. ${CMAKE_SOURCE_DIR}/Src/main.c). The new approach perfectly works when top-level CMake list is the one in project root directory generated by CubeMX, but it fails when used as part of another (non-CubeMX) top-level project, due to broken paths to source files. A few words about my project structure:my_cmake_project/ ├── boards/ │ ├── BOARD_A/ │ │ ├── cmake/ │ │ │ ├── stm32cubemx/ │ │ │ │ └── CMakeLists.txt <- defines "stm32cubemx" target wit
Issue: ST67W6X_CLI lockup Test Setup:Use the ST67W6X_CLI example provided with the x-cube-st67w61-v1.0.0 software package.Send wifi_sta_connect command to connect.Send several ping commands to verify connection.Keep the connation active.Wait for 5 to 10 minutes then repeat the ping commands. Observation:Fail to respond to atcmd AT reset required to recover.See attached.
Hi ST team, Been trying to build a bare bones MX generated project for the STM32H563ZI using CMake, for both TrustZone and non-TrustZone Projects. Had the same issue on both Ubuntu22.04 and Ubuntu24.04, and am unable to compile any of these projects. When I have TrustZone enabled with both S and NSC projects enabled I get the following error messages:```lachjet@lachjet-Katana-GF76-12UD:~/tzt2/uild$ make[ 6%] Creating directories for 'tzt2_S'[ 12%] No download step for 'tzt2_S'[ 18%] No update step for 'tzt2_S'[ 25%] No patch step for 'tzt2_S'[ 31%] Performing configure step for 'tzt2_S'Build type: Debug-- The C compiler identification is GNU 11.4.0-- The CXX compiler identification is GNU 11.4.0-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Check for working C compiler: /usr/bin/cc - skipped-- Detecting C compile features-- Detecting C compile features - done-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Check for work
Hello @STTwo-32.In this new release 6.13.0 I can`t use the internal Voltage Reference in STM32U585. I also don't see the option to select the Internal Voltage Reference in VREFBUF setting. It's very bad(.
Hello,While creating a project for STM32N6 I can’t find the option for hexaspi or octospi for STM32N657B0HxQ . Is there any particular option I have to enable?I am trying to generate the ioc similar to STM32N6570-DK board .I am on 6.15.0 STM32CubeMX. Where is octo and hexaspi option?also which mode I have to enable FSBL + Non Secure/Secure or only Non Secure/SecureBest Regards,D
Hi,APB1 clock can't be enabled if HSI clock is chosen. It says that the driven clock must be 10M<=x<48M, so, without using the PLL it's impossible to get the 10MHz. Things get worse when I try to feed the PLL from the HSI: it says that the PLL should have HSE as an input!If I go on despite the recommendation, then I get this message: How can I enable the APB1 clock without using an externa crystal? What should I do if I want to choose both: not to use an external crystal and still using the USB peripheral? For now I can disable the USB port because I'm not in a rush with it, but this isn't a solution.May I overlooking something?BTW, this is a custom board. Thank you in advanced!
Hi, I am using the following environment:OS: Ubuntu 20.04 LTSSTM32CubeMX: 6.15.0Visual Studio Code: 1.103.2STM32Cube for Visual Studio Code : 3.5.1Board: NUCLEO-H563ZI I found a bug where the STM32H563XX_FLASH.ld file is not generated after generating code.This bug can be reproduced by following the steps below:Create any cubemx project for STM32H563xx.Set "The Toolchain / IDE" to CMake.Click "Generate Code" .After generating code, the files "STM32H563xx_FLASH.ld" and "STM32H563xx_RAM.ld" are generated.However, the CMake build environment requires only STM32H563XX_FLASH.ld. As a result, the CMake build fails and reports the error : "my_project/STM32H563XX_FLASH.ld: No such file or directory" On the other hand, I found that the "STM32H563XX_FLASH.ld" can be generated if "Apply Application Regions Settings to Linker Files: ON" is enabled in Memory Management Tool.
Hey everyone,I'm currently trying to work with the NUCLEO-U386RG-Q development board.When I try to download the latest available MCU package (1.2.0) via STM32CubeIDE, I only get an error message stating that the requested MCU package is not available. This is obviously incorrect, as I can manually download and install it from the ST website. When I try to install one of the previous releases, the connection is established, but the download is extremely slow for some reason. Other MCU packages, like those for the STM32U5 series, download without any issues and complete within seconds.I'm using STM32CubeIDE version 1.19 and have already completely reinstalled it. A refresh of the package list also doesn't solve the problem.Is anyone else experiencing this or knows how to fix it?Best regards,Max
I used STM32CubeMX to configure an STM32F401RETx USART6 for 115200 baud. I searched but could not find an example to start from. I enabled USART to register USART callbacks using the STM32MXCube Project Manager Advanced Settings. My project utilizes FreeRTOS, so I added that and created a simple default task to receive a character and output a message each time a character is received.I used an FTDI TTL-232-RG-VIP-WE cable connected to GND, 3V3, PC6, and PC7, and to a Windows PC set for 115200/8/N/1.At run time, I set a breakpoint where the character should appear in my receive buffer, and observed that I was getting garbage in. Also, I saw I was getting garbage out. I stepped the initialization, configuration, interrupts, and callbacks — all appeared to be working correctly.In desperation, I experimented with the baud rate and found that I could send and receive good characters with the PC set to 38400 baud while the STM32F401 remained configured for 115200. What is going on here
Hi,Running STM32MX Tool 6.15.0 On Windows 10.Started a project for a STM32U535CCTx.I've enabled ADC and configured channel IN8. The software thinks this is connected to PA4, but the datasheet says it is connected to PA3. See screen caps below. Regards John
Hi All,I had 2 questions in my current journey learning stm32 software as well as my stm32f746g board. I generated code based off an .ioc file created by the AI Edge Dev Cloud (a human activity keras model). My issues are as follows: 1. I debugged the code under OpenGDB and received this as my console output (see attachment below) however all my STM32 does is flash the led red and green rapidly. Does that mean it was successful? 2. I went back to the STM32CubeMX software to validate my model on target after debugging, however all i get met with is this output and the validation being stuck at 99% indefinitely. Any guidance on this issue is greatly appreciated. Thank you :)-Ramy
I have a simple program using Touchgfx and Freertos running on the following:STM32H735G-DKSTM32CubeIDE V 1.19.0STM32Cube_FW_H7_V1.12.1I have enabled SDMMC1 (in 1 bit mode, but 4 bit is the same), configured FATFS, and created a task to mount the SD card and open a file, from a button on a touchgfx screen. The card is formatted for FAT16, but format type makes no difference.f_mount fails every time with mostly file system not found, and sometimes disk error.After weeks of painstaking step by step debugging, I realized the problem occurs at line 274 in sd_diskio.c:if (!((uint32_t)buff & 0x3))This file is automatically generated by CubeMX as part of the generation process. Once generated, this file has two user options, which are both required when using the H7 to enable cache maintenance:#define ENABLE_SD_DMA_CACHE_MAINTENANCE 1#define ENABLE_SCRATCH_BUFFERWith the scratch buffer enabled, this line is supposed to check whether the fs-win buffer where the SD card sector will be loaded
I used STM32CubeMX to generate code for the STM32U083 following the instructions in Lab 3 of the STM32U0 Workshop presentation (V2.3, last modified Fri 12 Jul 2024 09:51:37 AM ). One of the steps in the lab is to set the RTC configuration on page 102. Upon code generation, this value appears at the end of MX_RTC_Init() in the following code snippet: /** Enable the WakeUp */ if (HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 10246, RTC_WAKEUPCLOCK_RTCCLK_DIV16, 0) != HAL_OK) { Error_Handler(); }The lab then goes on to instruct the user to include the very same code snippet in the main loop: /* USER CODE BEGIN WHILE */ while (1) { HAL_GPIO_WritePin(GPIOA, GPIO_Pin_5, GPIO_PIN_SET); HAL_Delay(1000); HAL_GPIO_WritePin(GPIOA, GPIO_Pin_5, GPIO_PIN_RESET); HAL_SuspendTick(); if ( HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 10246, RTC_WAKEUPCLOCK_RTCCLK_DIV16, 0) != HAL_OK) { Error_Handler(); } HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); HAL_ResumeTick(); SystemClock_Conf
I have a project that is using AzRTOS, ThreadX, NetX, FileX, UsbX, and i'm still using cubeMX to reconfigure the hardware and drivers. I understand that users need to put code between the "USER CODE BEGIN" and "USER CODE END" comments, if you're still updating with CubeMX.But there are several issues with AzRtos and FileX (even the STM examples provided don't work properly), so to fix some of these issues, I want to add code to AZURE_RTOS/App/app_azure_rtos.c. At the beginning of the file I can add user code: VOID tx_application_define(VOID *first_unused_memory) { /* USER CODE BEGIN tx_application_define_1*/ /* USER CODE END tx_application_define_1 */ but there is no provision to add user code at the end of this routine (after the memory pools have been allocated). Also note that this routine is called from Middlewares, and I don't want to start modifying that code.So my question is:Is there a way to add code to a file that is outside "User code" comments
Hi there! This might be a silly question, but I'm truly having trouble to find any documentation concerning the new User Actions feature, what are its functionalities, and how does it work. Unfortunally, it is not even mentioned in the UM1718 User manualAlso, the only mention I even found of this feature is in this forum question Could anyone please refer me to some documentation on the topic? Thanks in advance!
by using the stm32h750xbhx i created two projects. one is bootloader and other is application. we are trying to use external flash to store the application, as the file size is much larger than the capacity of the internal flash.and we are trying to flash the bootloader to internal flash and from the bootloader we will jump to the application program which is in external flash.(can we do that directly or we need qspi to do the jump also).and we are planning to run the application on the external flash like xip(execute in place).what is the best way to flash the application to the external flash.can we do the whole process like this and what is the best procedure to follow if possible clarify the confusion around the qspi intialization, where to do and when to do.
在使用 STM32CubeMX 进行项目配置时,我只启用和配置了与 SPI 外设相关的功能,而没有激活任何 I2S 功能。生成代码后,我选择使用低层 (LL) 库进行 SPI 驱动程序开发。但是,在项目编译过程中发生了链接器错误。 经过调查,确定了根本原因:意法半导体提供的LL库源文件 不是纯SPI驱动程序,而是复合SPI/I2S驱动程序模块。该文件包含SPI和I2S功能的函数实现。其中,某些I2S函数(例如某些初始化或时钟配置函数)调用依赖于中的实现的特定函数,其中之一是。stm32g4xx_ll_spi.cstm32g4xx_ll_rcc.cLL_RCC_GetI2SClockFreq 由于我的项目从未配置或使用 I2S,因此 STM32CubeMX 的构建系统在生成项目时不包含包含函数实现的代码模块 。但是,由于该 文件是完整编译的,因此其中的 I2S 代码需要链接到该函数,最终导致链接器报告错误——缺少符号。LL_RCC_GetI2SClockFreqstm32g4xx_ll_spi.cLL_RCC_GetI2SClockFreq 目前,我采用了一种临时解决方法:在 CubeMX 自动生成的设备头文件中,我注释掉了用于控制 I2S 功能编译的宏定义:stm32g474xx.h c // #define SPI_I2S_SUPPORT /*!< I2S support */ 这会导致预处理器在编译 LL 库源文件期间排除所有与 I2S 相关的代码,从而避免引用 并允许项目成功编译。 LL_RCC_GetI2SClockFreq 然而,这种方法有一个明显的缺陷:它不是一个根本的解决方案。每次使用 STM32CubeMX 重新生成代码时,我对文件的手动修改都会被覆盖,需要重复相同的注释作。这大大降低了开发效率,并表明当前项目配置或库文件组织存在固有的低效率。STM32G474xx.h 希望能够实现一种可配置的方法,使构建系统能够自动检测项目中外设的使用情况,并智能地决定是否编译LL库中的I2S相关代码,而不是依赖这种手动修改自动生成文件的方法。 Adding the English version : When using STM32CubeMX for project configuration, I only e
Good day,I'm using CubeMX 6.15.0 and CubeIDE 1.19.0 on MacOS 15.6.1 on Intel and Windows 10.I've got a little situation, when generating footprints for Altium, I go into <Tools><CAD> and after a short period CubeMX will say "Connection lost... Please check network status".I try again and again, Windows, Mac, CubeIDE, CubeMX. Always the same result.Then I connected my laptop to a hotspot on my phone that bypasses our firewall and - BAM - I get the footprints. Apparently one of the necessary IP addresses is being blocked, likely due to attacks form another IP in the same subnet band.Question: So I can go to my networking guy and get the connection through, what IP bands are ST using when generating these CAD symbols?Thanks,Andrei
Greetings All,I am using STM32CubeIDE Version 1.18.0, and MxCube Version 6.14.0I have several configured UARTs with the Yellow Triangle Warning, all of themstart with "Hardware Flow Control (RS232) conflict ......." and each has a uniqueconflict. The UARTs are configured with just the TX and RX pin in Asynchronous mode,and Hardware Flow Control (RS232) set to Disabled. Question 1: Are these conflicts something I should be paying attention to, is somethingdrastically incorrect, and will cause failures?As I am not using RTS/CTS pins, I cannot have flow control enabled? Correct?Why the warning?The UARTs seem to be functional. Question2: Hovering the mouse over the Yellow Triangle, or any Yellow warning, seems veryinconsistent, sometimes it shows the warning reason, sometimes it doesn't, and you haveto move the mouse around, until it finally shows you the error, is this be design, or justa problematic user interface? :) ThanksKen
Hi,When I tried to generate a project with ThreadX for STM32N6, STCUBEMX generated incomplete code.CubeMX Ver : 6.14.0MCU: STM32N6Platform: Ubuntu 24.04ioc file attached.
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.