Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I have tried to generate a project with the STM32U5F7VJT6 and ThreadX, the generation fails saying the cmake project generation had failed. Checking the cmake file, it is full of placeholders. cmake_minimum_required(VERSION 3.22) {{sr:Enable_CMake_lanuages}} # STM32CubeMX generated symbols (macros) set(MX_Defines_Syms{{sr:symbols_c_SYMB}} $<$<CONFIG:Debug>:DEBUG> ) # STM32CubeMX generated include paths set(MX_Include_Dirs{{sr:include_c_DIRS}} ) # STM32CubeMX generated application sources {{sr:STM32_Application_ToReplace}} # STM32 HAL/LL Drivers {{sr:STM32_Drivers_ToReplace}} # Drivers Midllewares {{sr:drivers_midllewares}} # Link directories setup set(MX_LINK_DIRS {{sr:link_DIRS}} ) # Project static libraries set(MX_LINK_LIBS {{sr:link_LIBS}} STM32_Drivers ${TOOLCHAIN_LINK_LIBRARIES} {{sr:list_library}} ) # Interface library for includes and symbols add_library(stm32cubemx INTERFACE) target_include_directories(stm32cubemx INTERFACE ${MX_Include_Dirs}) targ
Hi,I have upgraded recently to STM32CubeMX 6.15 on Linux and regenerate code for my STM32G491RE project (that uses iostream). Since this, it gives me compilation errors on missing libc symbols (for example putwc). After investigations, it seems the linker script generated has changed and I wonder if it is expected.Last part of the script has changed from:/DISCARD/ : { libc.a ( * ) libm.a ( * ) libgcc.a ( * ) }to/DISCARD/ : { libc.a:* ( * ) libm.a:* ( * ) libgcc.a:* ( * ) } Could you confirm this is valid and the expected behavior of the new declaration ? Regards
Hello?Now I install cubemx lastversion. I already connected internet. wifi my home.but I can't connect.
Hi,After updating to cubeMX 6.15, I cannot configure OCTOSPI in Quad mode.To reproduce this bug :Create a new project selecting STM32H730ZBT6Select Connectivity->OCTOSPI1->ModeI cannot select select Quad mode because Quad SPI2 mode is selected ==> Of course NOTNow go to :Select Connectivity->OCTOSPI2->ModeAlso cannot select Quad mode in OCTOSPI2OK, it looks to be a bug.Please ST developers, help me to find a workaround I can continu my project.Regard's
STM32H562, STM32Cube FW_H5 V1.5.0, X-CUBE-FREERTOS.1.2.0If i want a FreeRTOS queue of size 32 and item size 12 bytes i will write 32 i Queue Size and 12 in Item Size in CubeMX. Previously it would generate init code:osMessageQueueId_t setpoint_sendHandle; uint8_t setpoint_send_buffer[ 32 * 12 ]; osStaticMessageQDef_t setpoint_sendControlBlock; const osMessageQueueAttr_t setpoint_send_attributes = { .name = "setpoint_send", .cb_mem = &setpoint_sendControlBlock, .cb_size = sizeof(setpoint_sendControlBlock), .mq_mem = &setpoint_send_buffer, .mq_size = sizeof(setpoint_send_buffer) }; setpoint_sendHandle = osMessageQueueNew (32, 12, &setpoint_send_attributes);With STM32Cube FW_H5 V1.5.0, X-CUBE-FREERTOS.1.2.0 i get:osMessageQueueId_t setpoint_sendHandle; uint8_t setpoint_send_buffer[ 32 * sizeof(12)]; osStaticMessageQDef_t setpoint_sendControlBlock; const osMessageQueueAttr_t setpoint_send_attributes = { .name = "setpoint_send", .cb_mem = &setpoint_sendControlBlock,
I am having a "how did this ever work" moment. Maybe I found a (horrible) bug, or maybe I'm overlooking something.In tickless idle mode FreeRTOS uses the COUNTFLAG in the SysTick SYST_CSR to determine if WFI exited due to the systick, and then calculates how many RTOS ticks have elapsed: configPRE_SLEEP_PROCESSING( xModifiableIdleTime ); if( xModifiableIdleTime > 0 ) { __asm volatile( "dsb" ::: "memory" ); __asm volatile( "wfi" ); __asm volatile( "isb" ); } configPOST_SLEEP_PROCESSING( xExpectedIdleTime ); /* Re-enable interrupts to allow the interrupt that brought the MCU out of sleep mode to execute immediately. see comments above __disable_interrupt() call above. */ __asm volatile( "cpsie i" ::: "memory" ); __asm volatile( "dsb" ); __asm volatile( "isb" ); /* Disable interrupts again because the clock is about to be stopped and interrupts that execute while the clock is stopped will increase any slippage between the time main
Hello Forum,I am trying to install STM32CubeMX version 6.15.0 on Windows 11 (64bit). I want to install it for "all users". I've downloaded and extracted the archive. I can run the installer 'SetupSTM32CubeMX-6.15.0-Win.exe' with Admin privileges and it extracts and runs to the "Select Install Mode". At this point if I choose "Install for all users" then the dialog just exits and nothing happens. It works as expected with STM32CubeMX version 6.12.0Does anyone have any ideas on what's going wrong? A big ask I know. Can anyone suggest where to look for clues, are there any install logs that may give me a clue as to what's happening?Here are the machine details:Windows Type: Windows 11 Enterprise, Version 24H2, OSBuild 26100.4946Processor: 13th Gen Intel(R) Core(TM) i5-1335U (1.30 GHz)RAM: 64.0 GB (63.6 GB usable)System Type: 64-bit operating system, x64-based processorDisk: 477GB free space on the SSD, C:\Update: I've also tried
Hello, I start using Free RTOS on H755ZI dual core, I only use RTOS on core M7, core M4 do nothing and I received a notice from CubeMX:"CubeMX strongly suggests to use a time-base source other than SysTick when FreeRTOS is used."But I can not change Systick to other timer be like the image above. What setting step did I miss?
I am using custom board with STM32G030F6P6. Used Cube Mx to generate code with LL library. Interrupts not working, I need to add this SCB->VTOR = FLASH_BASE; in main.c Even after this also ADC DMA interrupt wont work. Need to rewrite the ADC_Init() to get it work. Just keeping you informed. Same thing happened with STM32G030C8T6 also
CubeMX and STM32CubeIDE will generate a .ioc file associated with the configuration of the MCU to be programmed. For a modest project with few connections, adding the GPIO and their labels is normal, but when there are 130+ signals this become a tedious and error prone task.We need a way to import data into CubeMX. @st_it team: please add a function to CubeMX/STM32CubeIDE to import a list of GPIO, pin, port, config, etc into the configuration of the MCU which is being used.Alternately/in the meantime: you could also publish the full specification of the file and its fields, so we can modify it with some scripts.Thank you in advance.
When i export the pins from Cube, it does so, except for the ADC pins.Its CubeIMX 6.8.0
Hi,I have a project with TouchGFX based on STM32N6570-DK.In STM32CubeMX, once I tried to add X-CUBE-AI, I got stuck, and the error is appeared as shown below.What does it mean?Once I removed the TouchGFX Graphic Application, the X-CUBE-AI can be enabled, but the generator removed MX_TouchGFX_Init() etc.Are there any side effects, if I restore the TouchGFX code manually?And I’m curious — why does this limitation exist?Regards!
Hi!I found a bug in stm32h503xx.h (version 2023) The SNB field has too many bits:#define FLASH_CR_SNB_Msk (0x7FUL << FLASH_CR_SNB_Pos) Correct is only three according to the reference manual (8 pages of 8K flash), therefore it should be#define FLASH_CR_SNB_Msk (0x07UL << FLASH_CR_SNB_Pos) With kind regards,Jochen
I updated to CubeMX 6.13.0 and firmware package 1.12.0 for and STM32H755BIT chip and found several issues with the new release:Where is it documented that the new ExitRun0Mode() requires 'USE_PWR_LDO_SUPPLY" to be defined if I want to use that mode? Shouldn't it be defined by CubeMX when the power parameters are selected in the RCC section?If I am using the Voltage regulator in the LDO supply mode (see RM0399, p 274, Fig. 22, Section 1), what is the purpose of defining SMPS in line 217 of stm32h755xx.h? In line 440 of system_stm32h7xx_dualcore_boot_cm4_cm7.c the define of SMPS is used to disable the SMPS - shouldn't the define be used to enable the SMPS?Worst issue: The clock rates returned from PCLK function calls shown below are now showing 240 MHz! This has messed up the USARTs and all the timers. I thought the MAX clock rate for the PCLK clocks were 120 MHz (see DS12919, p. 110, Table 23, fPCLK, at VOS0 setting). HAL_RCC_GetPCLK1Freq(); HAL_RC
Hi,I used cubemx to generate three projects (Boot, Appli and ExtMemLoader) of STM32H7R7, the boot project was responsible for initializing Octol SPI FLASH, but the initialization failed, and I couldn't jump to the app.I followed this tutorial to configure cubemx:https://community.st.com/t5/stm32-online-courses/stm32h7rs-and-ospi-in-practice/ba-p/810411 the hardware:board: art-pi2 (art-pi2 )mcu: STM32H7R7L8HxHOctal Spi Flash: W35T51NW (datasheet )development env:STM32CubeMX 6.15.0STM32CubeCLT 1.19.0STM32Cube for Visual Studio Code 2.1.1STM32CubeProgrammer 2.20.0the attachment is the project included cubemx projectIn stm32_extmem_conf.h file, print debugging is turned on#define EXTMEM_DRIVER_NOR_SFDP_DEBUG_LEVEL 4 #define EXTMEM_MACRO_DEBUG printf Boot print log: SFDP::1 - reset data SFDPObject to zero SFDP::2 - initialize the SFDPObject SFDP::3 - set memory link and speed to 50Mhz maximum SFDP::4 - analyze the SFPD structure to get driver inf
Hello,when doing code generation by CubeMX, it seems, that there's no Pin-remapping done in certain cases, at STM32C092FCP6.In my case, I chose SPI2 in master full-duplex mode. SPI2_CLK is on PB8 at Pin1. A remapping from PB7 to PB8 has to be done by setting PINMUX4 in SYSCFG->CFGR3 register. I thought this would be done by CubeMX code generation, but i didn't. The same is with SPI1 SCK, at Pin 20 with PB6/PB3. Is this the desired behaviour?
Hi, There is a blatant bug in the STM32CubeIDE that has costed me a board iteration on a professional product. It says that pin PA3 is positive comparator input. When it isn't. Look here This is what the datasheet says.
I'm configuring an STM32G031, using the STM32CubeMX perspective in STM32CubeIDE. I want to optimise for low power consumption. My device uses the ADC and I see the ADC has a minimum acceptable frequency, 140kHz according to the data sheet (data sheet table 57, fADC must be at least 0.14MHz).I've configured the clock so that SYSCLK = 2MHz (HSI 16 MHz oscillator, divided by 8). The ADC clock is also shown as 2MHz. That makes sense.But in the ADC configuration panel, the only clock options I can select are "sync divided by 1" or "async divided by 1". I expected to be able to select higher dividers, down to "async / 8" (which would be 250kHz). I can't even select "sync/async divided by 2" (which would be 1MHz). All those slower options are greyed out, and when I mouse over them there's a tooltip that says something like "prescaler does not respect fADC fmin fmax conditions" or something like that.Is this a configuration error in CubeMX, or hav
function HAL_InitTick() in generated code from STM32Cube IDE does not register the TimeBase_TIM_PeriodElapsedCallback after HAL_TIM_Base_Start(&htim6). it just returns the result if Timer Start.setting up the callback is done after this but never reached when HAL_TIM_Base_Start() worked fine. As a result, the tick does not count. if(HAL_TIM_Base_Init(&htim6) == HAL_OK) { /* Start the TIM time Base generation in interrupt mode */ return HAL_TIM_Base_Start_IT(&htim6); } HAL_TIM_RegisterCallback(&htim6, HAL_TIM_PERIOD_ELAPSED_CB_ID, TimeBase_TIM_PeriodElapsedCallback); /* Return function status */ return HAL_ERROR; }Edited to apply source code formatting - please see How to insert source code for future reference.
in app_freertos.c, the hook prototypes are not all defined as __weak. This requires either deleting those prototypes or rewriting them with the __weak attribute to avoid multiple definitions when they're actually used in user code. I generally do not like to modify the IOC provided code unless it's main.c. Even though there are user sections, I'd like to have to modify as few things as possible to get a working projectI do use the hook prototypes frequently, but the hook definitions are autogenerated and not in a user area.Please change your code to add the __weak attribute, as shown in the segment below. I've got them commented out because I transplanted the definitions into the user area so I would at least keep them./* Hook prototypes */ //__weak void configureTimerForRunTimeStats(void); //__weak unsigned long getRunTimeCounterValue(void); //__weak void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName); //__weak void vApplicationM
STM32CubeMx version is 6.12.1.The power and thermal option is not available for STM32G474xx devices project in STM32CubeMx.The same is available for the STM32U5Xxx devices project. How to set the wake-up modes if the power and thermal option is not available?
Hello.. i m working on Ethernet RMII on H743 nucleo, and encountered this error msg, could anyone advise how to configure RAM at 0x24000000? TQ!
The ST docs all refer me back to using HAL with CubeMX however I see many suggesting staying away from it.I could not find where to download and use libraries such as CMSIS for my STM32F407G Disco board Are the libraries I need already in my CubeIDE project somewhere? I rather not use only bare metal, so CMSIS would be the way to go right?
STM32G474RET – When I try to set up a DMA, I get this message: “No available DMA request for this peripheral.”I haven’t configured any other DMA.With a different MCU, it worked fine before.I’m using CubeIDE version 1.16.0. Any ideas would be really helpful, as I’m new to STM32.
Hi When I use stm32cubemx V6.15, I find that enbale OSPI as QSPI mode is not feasible.It say another Quad spi is activated, but actully not.When downgrade to V6.14, I can enable Quad spi.Can you help confirm this issue?
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.