Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
HiLooking at recent STM32Cube FW for H7 (1.13 after 1.11) or G0 (1.6.3 after 1.6.2), I found that line endings in the archives downloaded by CubeMX (e.g. stm32cube_fw_g0_v163.zip) in several files have been changed from CR/LF to LF.In principle, I welcome this change, but as it makes large parts of code appear “different” to existing code base (unless one already cared about correct handling and conversion in the past), shouldn’t there be some warning during code generation when overwriting large amounts of files that still have CR/LF?! Did I miss some announcement?Kolja
Hello,I have an STM32H743VIHx project created and developed using STM32CubeMX version 6.16.After automatically migrating the project to STM32CubeMX version 6.18.0 / 6.18.1, I encountered an issue with the FreeRTOS configuration.The migration process completes successfully, but the FreeRTOS configuration is lost. The previously configured FreeRTOS settings, including tasks, queues, semaphores, and other RTOS-related parameters, are no longer available.Furthermore, when I try to open the FreeRTOS configuration section in STM32CubeMX after migration, the configuration page cannot be opened properly.If I generate the code after this migration, all FreeRTOS-related code is automatically removed from the generated project. The generated project no longer contains the expected FreeRTOS initialization and configuration code.Additional information:Figure 1 shows the project after automatic migration from STM32CubeMX 6.16 to 6.18.x.In this migrated project:The FreeRTOS configuration option canno
First, specs:CubeMX Version 6.18.1 on Mac OSXMPU: STM32U595RIT6IDE: VSCode 1.123.0 on Mac OSX OK, So after a large amount of searching on how to add the DSP libararies, which have been moved in recent CubeMX versions, I have a new issue. When trying to build the previously-successful project, I get this error: I know for a fact the .a file libarary is indeed present where it’s supposed to be. Here is the library section that was modified in the newly-generated makefie: As I mentioned, the .a file is present in Middlewares/ST/Arm/DSP/Lib. Though, I find it weird the error about “-l-Wl,--start-group” not being a file or directory. That just seems bunged up to me. But this is exactly how the makefile came out of CubeMX. Any ideas here? Any help would be massively appreciated! Thanks!
Hi all:On the following page:https://www.st.com/en/embedded-software/stm32cubeg0.htmlThere is an option to download Patch_CubeG0 v1.6.3, but the file named stm32cubeg0-v1-6-3.zip only weighs 70 MB, and, depending on the unzip compressor, I get errors like "Unexpected end of archive" or "End-of-central-directory signature not found".I have tried downloading the file with different browsers and tools, to no avail.I can download the previous version stm32cubeg0-v1-6-2.zip without no problems. It is much bigger and identical to the one I had downloaded a long time ago.Is the v1.6.3 patch file corrupted on the st.com server?If I try to download the full version, I only get v1.6.0. If I click on the "Get from GitHub" button next to it, I get a full v1.6.3 called STM32CubeG0-1.6.3.zip, but then directory "Drivers/STM32G0xx_HAL_Driver/" is empty.I could manually piece the latest versions together from Git, but this is time consuming and error prone.Is there another way?Thanks in advance, rdie
Hello, When I launch STM32CubeMX (version 6.0.7), a message appears (see the attached file) Is there a plan to release an update that will allow this program to run without Rosetta?
I am unable to search for and select the official STM32G491RET6b MCU based Nucleo-64 Development board on the latest STM32 CubeMX v6.17.0 software. One online tutorials suggested that only the official STM32-based microcontroller boards from the company are supported in this tool, but since this STM32 Nucleo G491RE is a genuine, official board as is listed. So, why is this board not shown in my latest CubeMX tool installation?
Hello Team, We are developing a custom board based on the STM32N657 MCU. During pin assignment in the CubeMX tool, PB3 is shown with the JTDO_SWO function. However, the datasheet indicates that the SWO functionality is associated with PB5. Could you please confirm which pin actually supports the SWO function?Thanks
Hi everyone,I'm working on an STM32 project using STM32CubeMX and noticed that initialization code is generated for peripherals that I don't always use.Is there a recommended way to configure CubeMX so that only the required peripheral initialization code is generated?Thanks!
Hello everyone,I am working on a cosmic muon detector project using two SiPM detectors and an STM32F446RE Nucleo board.My circuit holds the fast SiPM pulse for 20 µs. The two analog signals are connected to ADC Channel 0 (PA0) and ADC Channel 1 (PA1).What I want to do: Time Difference ($\Delta t$): Measure the exact arrival time between both detector pulses to check if it is a real muon (coincidence window). ADC Measurement: Read both peak voltages at the same time and convert them to mV. Serial Output: Print the time difference ($\Delta t$), raw ADC values, and mV values to the Serial Monitor via UART. My questions: What is the best way to configure the STM32 timer (Input Capture) to measure the small time difference between the two pulses? Should I use Dual Simultaneous ADC mode to sample both channels at the exact same time? How should I set up the code in STM32CubeIDE so the serial output does not miss fast events? Any simple example code or setup advice would be very helpf
OK, thank you it is so easy to omit.Could you please help me with another issue on usbx: Default value for “CoreStack Device/Host” is “enable” but there is warning in red: The component “USBX/CoreSystem” must be selected alongside either “USBX/UX Host CoreStack” or “USBX/UX Device CoreStack” Core Sytem is selected as you can see. Or is it referencing to some other component?
Hi,I'm bringing up a USB MSC device on an STM32U385CGT6 with the USBX middleware in standalone mode. Everything comes from CubeMX 6.18.0 with STM32Cube FW_U3 V1.4.0 (USBX 6.4.0): USB_DRD_FS in device mode, USBX Core System + UX Device CoreStack + UX Device Controller + UX Device MSC.While comparing the generated code and some example applications (NUCLEO-U385RG-Q Ux_Device_HID_Standalone) it looks there is a regression in the generated HAL_PCD_MspInit. While the version from the example application enables Vdd USB, this is missing from the currently generated version of HAL_PCD_MspInit causing the peripheral to remain powered down. As a fix HAL_PWREx_EnableVddUSB(); can be called in the user code section at the bottom of HAL_PCD_MspInit. Best Regards, Cecil
Hello,I am currently trying to setup a blink example on NUCLEO-U5A5ZJ-Q and I have a bug using the default configuration from current CubeMX version (6.18.1).The generated binary ends up in an Error Handler in the SystemClock_Config function. The default clock configuration generated is the following: I have noticed that a similar issue has been notified in I have tried to use the bypasses mentioned in the previous post (setting the HSE source to 16 MHz, changing the SYSCLK Mux source, etc.) without success. Particularly, I am not able to find the setting allowing me to set HSE to “Crystal/Ceramic Resonator” in my CubeMX version.Thanks in advance for helping me resolve this setup issue,Best regards,Robin
Hi I am using the stm32h743 device I would like to enable the FMC wait signal in the CubeMxbut this option is not available even when changed the FMC memory type to PSRAM.also changed the extended Mode to enable.But the wait signal option is not available. I do not want to change it by force in code of main.c file
> Keywords (for search): STM32H7, H743, HardFault, black screen, startup crash, linker script, .ld, TLS, .tdata, .tbss, CubeMX, X-CUBE-AI, CubeIDE, GCC, arm-none-eabi## Symptom (check if this matches you)- Power-on: LCD **backlight on but screen stays black**; firmware seems to never start.- Debugger stops in `HardFault_Handler`; `CFSR = 0x400` (**IMPRECISERR**, imprecise bus error).- Backtrace stops in `Reset_Handler` (startup), **before `main()`**.- Often appears **right after regenerating with CubeMX** (e.g. after adding X-CUBE-AI).## How I traced it1. `CFSR = 0x400` → imprecise bus error = a write to an invalid address.2. `bt` → crashes in the startup `.bss` zero-fill loop (`str r3, [r2]`).3. Build map shows the four startup symbols are **not in the same memory region**:```_sdata = 0x24000000 (RAM / AXI SRAM)_edata = 0x20000000 (DTCM - BELOW _sdata!)_sbss = 0x20000000 (DTCM)_ebss = 0x240002FC (RAM / AXI SRAM)```→ the `.bss` zero-fill walks from DTCM (0x20000000) up to
Hello,Since updating to 6.18.1, clicking ACCESS TO BOARD SELECTOR on the homescreen freezes STM32CubeMX permanently. The window never opens, one CPU corestays pinned at 100%, nothing is written to STM32CubeMX.log, and the processcannot be closed - it has to be killed with kill -9 / xkill. ENVIRONMENT STM32CubeMX : 6.18.1 (updater.ini: SoftVersion=MX.6.18.1, DbVersion=DB.6.0.181)Update path : 6.17.0 -> 6.18.0 -> 6.18.1OS : Ubuntu 26.04 LTS (Resolute Raccoon), x86_64, kernel 7.0.0-29-genericDesktop : KDE Plasma 6.6.5, Wayland session (app runs under XWayland)JVM : Bundled JRE, OpenJDK 21.0.10+7-LTSInstall path: ~/Documents/STM32CubeMX STEPS TO REPRODUCE 1. Start STM32CubeMX and let startup finish.2. On the home screen, click ACCESS TO BOARD SELECTOR.3. The GUI freezes immediately and never recovers. LOGS"AWT-EventQueue-0" #46 [10722] prio=6 os_prio=0 cpu=72188.54ms elapsed=81.89s runnable java.lang.Thread.State: RUNNABLE at org.sqlite.core.NativeDB.step(Native Method)
On an STM32N657X0HxQ I'm bringing up two APS51208N octal-DDR PSRAMs (512 Mb / 64 MB each, x8) on a single XSPI1 controller, XSPIM Port 1, using EXTENDMEM to get a contiguous 128 MB map. This is configured in the FSBL context.Per RM0486 §28.4.24, one XSPI drives both NCS1/NCS2 autonomously when EXTENDMEM (XSPI_DCR1 bit 21) is set.My CubeMX config (which it accepts without error):- XSPIM: Direct (XSPI1 on Port1)- XSPI1: Octo SPI, Port1 Octo, Memory Type = AP Memory, Memory Mode = Enable- Memory Size = 512 Mbit (one die, per "the size of one external memory must be set in DEVSIZE")- Chip Select Boundary = 64 MB- Memory Select = NCS1I could not find any EXTENDMEM / dual-memory / extended-memory option anywhere in the CubeMX XSPI1 panel, so I'm handling the extended-memory parts in user code. Three things I'd like confirmed:EXTENDMEM has no CubeMX exposure: is setting XSPI1->DCR1 |= (1U << 21) manually after MX_XSPI1_Init() the intended approach, or is there a CubeMX setting I've m
Everytime CubeMx downloads files but in the end shows the below error every time. Please tell me how do i resolve.
I'm working on a dual-core project (Cortex-M7 + M4) for the NUCLEO-H755ZI-Q board in CubeMX/CubeIDE.I created the project using Board Selector (searched "NUCLEO-H755ZI-Q", selected the board, accepted the default LED/Button/Virtual Com Port options popup). Despite this, USART3's Mode dropdown is stuck on "Disable" and greyed out/unselectable in the peripheral configuration panel.Pins PD8/PD9 initially showed as "under BSP control". I right-clicked on PD8/PD9 in the pinout view and manually assigned them as USART3_TX and USART3_RX. The pins now show these labels correctly on the diagram — but the USART3 Mode dropdown is still stuck on "Disable" and I still cannot select Asynchronous mode, set baud rate, or configure anything.I also tried:Toggling the M7 core-assignment checkbox off/on for USART3 Creating a brand new project from scratch via Board Selector (same issue every time) What to do ?
The CubeMx project does not generate the Usart Init in main .c file. I can add manually but just verifying if any problem with my CubeMx software. Request to please verify. I mean it is not called from the main.c file.
I am unable to start a project from STM32CubeMX running on Linux Mint. I have no proxy setup on my network and verified the same with Connection Parameters > Check Connection. I also tried the steps with another ISP, however the issue persists. What is the fix for this?
I have an existing IOC project originally created using STM32CubeMX v6.6.1 with STM32Cube Firmware Package FW_L4 v1.17.2. When opening this project, STM32CubeMX fails to properly render the UI (see error message below).During this issue:All Save-related menu options are disabled (greyed out). The project filename displayed in the upper-right corner includes a *, indicating unsaved modifications. When attempting to close the project or exit the application, a prompt appears to save changes, but the project cannot actually be saved.Given this behavior, I would like clarification on the following:Could the IOC file be corrupted? Is this strictly a UI rendering issue, or something deeper (e.g., metadata or version incompatibility)? What is the likely root cause of this error, and how can it be resolved? 2026-07-01 09:08:40,585 [FATAL] ProcessBarDialog:168 - ProcessBarDialog action 4java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for
I recently switched to Mac Tahoe 26.1 and it seems since then stm32CubeMX 6.15 is not listing the contents of my Documents folder anymore. It doesn't seem like a rights management issue sincethere were no changes to the Documents rightsthey are identical to sibling folders which CubeMX would properly enumerateAnd yes, the folder does have contents and is not empty as shown in the screenshot from the file open dialog attached.Anyone experiencing similar issues? How to come around that?Best,Oliver
We have recently updated to the latest STM32CubeMX 6.17 and then STMCubeMX 6.18 and noticed in both versions that the internal temperature sensor is mis-reading (by something like 100x).Previously the project was reading the temperature correctly (STMCubeMX 6.14 or 6.15 not sure exactly).I have checked that all the ADC3 settings are the same and there are no changes causing by migrating the .IOC project.I’ve also checked the TSEN and VREFEN are enabled in ADC3_CCR. The value is 0x00C00000.Before I invest a lot of time rolling back to the old STM32CubeMX version and investigating what changed that broke the ADC3 internal temperature reading I’m hoping that this is known issue with the latest STM32CubeMX?STM32CubeMX generated code: /** Common config */ hadc3.Instance = ADC3; hadc3.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; hadc3.Init.Resolution = ADC_RESOLUTION_12B; hadc3.Init.ScanConvMode = ADC_SCAN_ENABLE; hadc3.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc3.Init.LowPowerAutoW
Hi everyone,I’m working on an STM32 project using STM32CubeMX and STM32CubeIDE. Everything builds and runs correctly right after generating the project, but after closing and reopening the project I sometimes run into build errors related to generated files or missing libraries.Regenerating the code usually fixes it, but I’m trying to understand why this happens in the first place.Has anyone experienced something similar with CubeMX projects? Is there a recommended way to organize the project or CubeMX settings so that generated files and middleware remain consistent when reopening the project?I’d appreciate any advice or best practices from people who work with STM32CubeMX regularly.
After I updated to CubeMX Version 6.18.0 (and newer CPU firmware pack 1.13 but this one not related to issue) I opened my older project and migrated to newer version. As a result I got error on Clock Configuration Page (see pic.1).pic.1I saved project and checked if anything changed... I did not hound any changed, but versions (see pics. 2 and 3) pic.2pic.3So, I downloaded older version 6.17.0 and there is no such issue. See pic.4 and pic.5 shows RCC block config. pic.4pic.5 RCC block config
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.