Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Time to time cubeMX configurator includes c files in multiples, which I can clear by deleting one of them. But cubeMX insists adding multiples again in each regeneration. In freshly generated projects it doesn't do so. That issue appears only when I attempt to make a revision using the cubeMX configurator.I am using cube IDE version 1.4.2 and :cube MXVersion: 6.0.1-RC3Build: 20200810-1643 (UTC)In the attached image you can see multiple includes of system_STM32F1xx.c file. Project builds smoothly when I delete one of them.
Hi,I have everything most updated, firmware/IDE etc... as I just check for updates yesterday and just now.Is the "HTTPD enabled and caused undefined reference" issue been resolved?I got this issue and found some unofficial ways to bypass it but I decided to start a new project to check it out what is wrong.I am able to repeat this error every time the HTTPD is enabled, without adding any code.In MX, first, I enable SDMMC and FATFS as I will need to work with SD Flash. Then I build without adding any line of code, no problem.Back to MX, I enable FREERTOS, because I will need this for TCPIP and websocket. Then I saved MX, do nothing then build immediately. No error.Back to MX, I enable LWIP, but not yet enable HTTPD. I saved MX and do nothing then build immediately. Also no error.Back to MX, I enable HTTPD, and its HTTP POST, and saved and not adding any line, then build immediately.I got a long list of red lines:make -j24 all arm-none-eabi-gcc "../LWIP/Target/ethernetif.c" -m
MCU: STM32H743IIT6When using Cubemx on Mac M1, enable "Apply Application Regions Settings to Linker Files", the generated .ld file error/*********************************************************************************** File : LinkerScript.ld**** Author : STM32CubeMX**** Abstract : Linker script for STM32H743IITx series** 2097152Kbytes FLASH and 0Kbytes RAM**** Set heap size, stack size and stack location according** to application requirements.**** Set memory bank area and size if external memory is used.**** Target : STMicroelectronics STM32**** Distribution: The file is distributed "as is," without any warranty** of any kind.********************************************************************************* @attention**** <h2><center>&copy; COPYRIGHT(c) 2019 STMicroelectronics</center></h2>**** Redistribution and use in source and binary forms, with or without modification,** are permitted provided that the following conditions are met:** 1. Redistrib
We use CubeMX to generate code for LL and FreeRTOS. After configuring the SYS timer to TIM14 in CubeMX, HAL_Init() and HAL_InitTick() in the generated stm32f4xx_hal_timebase_tim.c file use TIM14 as expected. LL_mDelay, however, is not generated and still relies on SysTick, which interferes with the FreeRTOS use of SysTick. This is not expected.We are aware of the xTaskDelay() function and want to use LL_mDelay in an early phase of system initialization.
I am trying to use the Pin ADC1_EXT11(PC11) and ADC1_EXT15(PA15) as ADC input sampling pins. But in the setting given in Cube IDE, if i enable injected conversion, additionally 2 pins are automatically getting configured for some reason. I don't know why? Is it that the, pins PA15 and PC11 are interrupt pins and whenever interrupt is triggered in those pins, ADC samples from pins PA6 and PB0.? and what is the difference in the below highlighted options
Hello. I'm trying to use Ethernet MAC with external PHY (LAN8720) but when I try to configure the Ethernet on the IOC there is no Advanced Parameters tab (STM32F407VGT6). HAL Lib. version is 1.27.1. I tried a few things but I had no luck. I think I'm missing something but couldn't figure out what. If you could take a look, It would be so helpful. Thanks in advance.
Hi Because power-off protection is required, the times or variables need to be stored in flash。Is my solution reasonable?Create a space inside the flash to define variables, and read the data after powering on the computer. Then there is a problem with data accumulation , inside the my program the define variables be accumulated, because the data is stored inside the flash. Does the change of data require special processing? HAL_FLASH_Unlock()How to define variables inside flash, please give a program example。Thank you
Hi i'm using MCU : STM32H743ZGT. At several ADC documents, it says that when ADC1 and ADC2 end sampling, the two results are stored in ADC_CDR together. The top 16 bits are the result of ADC2, or slave ADC, and the bottom 16 bits are the result of ADC1, or master ADC. I want to know how the two ADCs are stored in different registers, for example, each ADC_DR. Because I want to get more than 16 bits of data. Of course, we use the two ADCs as dual mode. Is there any other way? Thank you.
logic analyser picture has timer 1 channel 1 and another one is channel 2 it's duty 30% and frequency 100khz it's total ton+toff is 10 microseconds here I need to start the timer 1 channel 2 after 5 microseconds I need the output like this I I'm drawn here im using STM32H743IGT6 I had got the output in 50% duty but I can't get output other than 50% duty please help me anyone.
Hi, I would like to separate the project files (.project) and source files into different directories as shown in the image below. How can I do this? In my original project, I don't want my source files and project files (.project) to exist in the same folder, as shown below.
Hi,i want to import BLE_p2pServer example in CubeIDE 1.16.0 i got the message "This file has been generated with STM32CubeMX version '6.12.1'.Your current STM32CubeMX version is '6.12.0'." When i check for Updates, then I only have the option of updating CubeIDE itself to V1.16.1. How can I update CubeMx to V6.12.1 without updating CubeIDE? I think CubeMx is part of CubeIDE or do I have to install cubeMx separately?
我正在使用STM32L431RCT6,我的 HAL 版本是最后一个。我想使用 FreeRTOS 的最后一个 API 让我的项目更稳定: BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) PRIVILEGED_FUNCTION; #define xTaskNotify( xTaskToNotify, ulValue, eAction ) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL ) #define xTaskNotifyAndQuery( xTaskToNotify, ulValue, eAction, pulPreviousNotifyValue ) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotifyValue ) ) 但是我无法设置 ENABLE_MPU==Enabled,我不知道为什么:我的另一个配置是:我需要设置哪些选项才能启用此选项?
Just updated STM32CubeMx from 5.3.0 to 5.4.0 and discovered the new files sys.h / sys.c after code generation. What's the purpose of this file ? Obviously the containing function MX_SYS_Init() is never called ...
Hi,I am currently encountering an issue with STM32CubeMX (v6.12.1) when trying to generate the sample BSP code for the STM32H755ZI-6U (Nucleo-H755ZI-Q development board). Specifically, the usual pop-up prompt to select BSP drivers for demonstration code is no longer appearing when I create a new project.This issue started after I installed STM32CubeIDE alongside STM32CubeMX on my system (Windows 11) to compare the workflows between STM32CubeIDE and VS Code. At that point, I made modifications to some library files, particularly the CMSIS-DSP libraries, which seems to have triggered the problem. Prior to this, the BSP code generation was working correctly.I have tried reinstalling STM32CubeMX, and I am currently using MCU package version 1.11.2, but the issue persists. Additionally, I have noticed that the BSP dropdown is missing from the pinout configuration in STM32CubeMX. However, the BSP dependency files are present in the repository at the installation location, which suggests
hello, I can not find any good doc for packcreator. I would like to add a folder to my pack, it should be add on the root of my project. it is a tools for win, (exe, py, ...). I have added to others file and as a component. but after generating the project, it is not exist in my project. and how to use custom LinkerScript, I mean copy my file to original one after generating project.
I used STM32CubeMX to create cmake project for STM32F411CEUx. In the cmake\stm32cubemx directory there is a CMakeLists.txt file which defines a library called "stm32cubemx". This library contains all the code. Why STM32CubeMX uses such approach to project structure? Why treat all code as a library?I have problem with extending such project. There is a simple library I created for earlier project: a directory containing CMakeLists.txt and library source files. How can I add this lib to my project? In the past I used to insert the add_subdirectory(mylib) directive to the main CMakeLists.txt file but it doesn't work here. My lib is ignored and lib's include directories are not seen in main.c. I can add the directive inside cmake\stm32cubemx\CMakeLists.txt but then I get an error informing that my lib dir is not a subdirectory of cmake\stm32cubemx.I can add my lib files next to Drivers, Core, and Middleware and add their paths to cmake\stm32cubemx\CMakeLists.txt, but then my lib is no long
I am using STM32CubeMX 6.12.0 to generate a CMake project for VSCode on Linux. In the Software Packs Component Selector, I have chosen to include the DSP library.STM32CubeMX includes the library and headers when generating code. So far, so good.However, the include path, linker path and library are not specified in the the generated CMake files. I would expect these to be included by STM32CubeMX. But, not a problem. I can add them myself.target_include_directories(stm32cubemx INTERFACE...../../Drivers/CMSIS/DSP/Include)...target_link_directories(stm32cubemx INTERFACE../../Drivers/CMSIS/DSP/Lib/GCC)target_link_libraries(stm32cubemx INTERFACEarm_cortexM4lf_math) The problem with this approach is that when making changes to the IOC file and regenerating code, the CMake files are overwritten and these changes are not preserved. First, I expect that STM32CubeMX will add the necessary paths and libraries to the CMake files when specifiying additional software packs. Is this unreaso
Hello On the data sheet of the STM32H743BGTx it states that DCMI peripheral is available for the STM32H743BGTx.But on the STM32Cube IDE is says that is not available.In the following screenshot I have picture the message. Why DCMI is not available when on the data sheet it states that it is? Is there any other version of the ic that DCMI is available? Thank you
I have an STM32F407G discovery development kit. I activate CANBUS while doing pin configuration via CubeMX. Then in project manager > advanced settings > driver selector tab, I can select both LL library and HAL library in all options such as GPIO, DMA, USART, ADC. But when I want to select LL library for CANBUS, I see that only HAL library is available. Why is there no LL support for CANBUS in CubeMX? Is there any way to add it? I would appreciate if you can help me.
Hello,I've just bought two boards NUCLEO-C031C6 and I'm using Stm32CubeIDE to program the board.I would like to know if it's possible to connect an SD card with that board using SPI.I see that FatFS is no more available in Stm32CubeIDE, but there is Filex that should be the same, but there is no SD Interface checkbox, why?Any help will be appreciated.Thank you.Nello
Please help me everyone.I'm doing a project about stm32f746ng, they ask me to transmit sound through mems and convert it into waves on a tft screen but I've searched all the documents but still can't find the ioc and sample code. Who can help me? Thank you
Hello there :) I create a project with TouchGFX 4.24.1, then import it to CubeIDE 1.16.1, which are both the current versions. Once i open the .ioc file, it says the file need to either be migrated to 6.12.1 or I can use the file as is, which seems to be 6.12.0. So there might be some missmatch between the current software releases. Furthermore, and what really is my problem right now, is once I adjust any settings in cubeMX (USB_FS, ETH+LwIP), the files do get generated normally in the project directory, but are not included/linked in the project in cubeIDE at all. For small things this does'nt matter that much, but e.g. for LwIP there is so much stuff to manually add... Do I have something setup wrong, can this be adjusted, or is this i known bug with the newest release? I already did a clean reinstall of all STM-Programs.Example .ioc file attached (i just did a quick enable of USB and lwip for testing).Thanks!
According to my searches on the internet, I found at least 3 solutions to add FreeRTOS on top of the code generated with stm32cubeMX for STM32U5 ...1 - Get FreeRTOS from freertos.org or its GIT2 - Get FreeRTOS from the demo available on the B-U585-IOT2A eval board, on which FreeRTOS has been integrated with TrustZone3 - Get FreeRTOS 'classic-coremw-app' for stm32u5 from ST githubWhich way do you think is the easiest way for FreeRTOS implementation ?
Hello,My original project was created for STM32F030c8t6 and I want to get the list of compatible MCU, so that I can migrate my project to STM32f103C8T6. I opened the cubeMX table from CubeIDE. While I clicked the list of compatible MCU, the programs hangs at 52% as given in the picture attached.CubeIDE version 1.15.1 on Windows11Please let me know if you need more information
Hello,I'm currently using MX version 6.11.1 to generate code for the STM32U5G9ZJT6Q for the USB Video Class (UVC). However, I've noticed that the generated function for USB initialization, MX_USBX_Device_Init(), is mostly empty, and I'm unable to find a starting point for my implementation.The generated code for the UVC initialization is as follows: UINT MX_USBX_Device_Init(VOID){UINT ret = UX_SUCCESS;UX_PARAMETER_NOT_USED(ux_device_byte_pool_buffer);return ret;}In contrast, when I generate the code for the CDC class, it includes comprehensive initializations and is structured as shown below: UINT MX_USBX_Device_Init(VOID){UINT ret = UX_SUCCESS;UCHAR *device_framework_high_speed;UCHAR *device_framework_full_speed;ULONG device_framework_hs_length;ULONG device_framework_fs_length;ULONG string_framework_length;ULONG language_id_framework_length;UCHAR *string_framework;UCHAR *language_id_framework;UCHAR *pointer;/* USER CODE BEGIN MX_USBX_Device_Init0 *//* USER CODE END MX_USBX_D
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.