Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
We are pleased to announce that the minor version 6.18.1 of STM32CubeMX is available.What is new in 6.18.1:This release addresses and resolves the issues outlined below:Download error for crdb.zip during update STM32CubeMX displays a download error pop-up during data updates. Note : This issue is resolved for 6.18.1 and later versions. For the earlier versions customers may refer to the following workaround already shared in the community:Workaround for file download error: crdb.zip (Problem during download) | Community Error occurred while importing .ioc file created with STM32CubeMX older than 6.18.0 The “Continue and Migrate” features are not working properly for projects with PCC configured. Issue when setting clock to 240Mhz in STM32H743 and STM32H753 STM32CubeMX prevents the user from selecting 240 MHz, displaying the message: “240 MHz maximum frequency must be <= 225 MHz.” Fixed issues in 6.18.1:Refer to the STM32CubeMX online docu
An issue has been identified in which STM32CubeMX displays a download error pop-up during data updates. This issue does not prevent STM32CubeMX from working properly. To continue: Click OK twice. After these steps, STM32CubeMX can operate normally. If this pop-up affects your workflow, disable the Auto-Refresh feature: In Help → Connection and Updates, select No Auto- Refresh at Application start. Please note that if Auto-Refresh is disabled, STM32CubeMX uses the local cube-finder-db.zip file and does not retrieve updates automatically. If needed, manually update the data: Help → Refresh Data A fix is in progress in a future version.
Hey,I have some questions. First, why does the installer install the app below ~/Library/Application Support?This location is for the support files of an app, not the app itself. The installer, however, puts everything there, including the .app BundleImprovement: Please move the .app Bundle install location to /Applications or ~/Applications. Supporting files then belong in the aforementioned path. Second, why can the .app Bundle not be started on it’s own? When I open it, it loads a splash screen with a progress bar, but when the app windows comes up all it shows is a loading circle. To really start CubeMX2 you HAVE TO use the startup binary which the installer also provides, but there is currently no way to just start the app from the launcher.This is very bad as it goes completely against the way 99% of how Mac users launch apps. CubeMX1 does this correctly, why is that such a step backwards with CubeMX2 ? Because currently, after installing the app there is no way to start it from
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?
Hello everyone,I am experiencing an issue with STM32CubeMX version 6.18.0 right after a fresh installation. The software is unable to connect to the server to download repositories or updates.Here are the details of my situation:Network Environment: I am using my office Wi-Fi, which does not use a proxy server. Other applications connect to the internet without issues. Error Message: I keep getting a "Problem during server connection" error. Troubleshooting Done: I have already gone into the Connection Settings and tried changing the proxy settings to "No Proxy" as well as "System Proxy", but neither option resolved the issue. Since there is no proxy on our network, I am unsure what is blocking STM32CubeMX from reaching the server. Has anyone encountered this with version 6.18.0, or does anyone know which specific ports or URLs need to be whitelisted in our office firewall?Any help or guidance would be greatly appreciated. Thank you!
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
Dear STM Community Team,We are working with the STM32N657X0H3Q microcontroller in our custom hardware design. We have interfaced S80KS5123GABHB020 Octal RAM devices with the controller using the XSPI interface.In our design, we are using a dual Octal memory configuration as described in the STM32N6 Reference Manual. The two 8-bit memories are configured to operate together as a 16-bit external memory interface.We would like your guidance regarding the correct STM32CubeMX configuration settings for this dual Octal memory setup.Our configuration details are: MCU: STM32N657X0H3Q External Memory: S80KS5123GABHB020 Interface: XSPI Memory Configuration: Dual Octal mode (two 8-bit memories forming a 16-bit interface) Intended usage: External RAM for (ltdc)framebuffer Memory mapped access: XSPI memory-mapped mode Could you please confirm the recommended STM32CubeMX settings for the following parameters? XSPI mode selection: Should the configuration be set as HEXASPI mode? Are
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
Environment:STM32CubeMX version: 6.18.1 STM32CubeIDE version: 2.2.0 STM32 MCU: SMT32H7R3Z8J6 OS: Windows 11Project configuration:Code Generator option: "Generate peripheral and middleware initialization as a pair of .c/.h files per peripheral (optional)" = [Enabled / Disabled] Relevant peripherals already enabled before: xSPI, USART1 New peripheral added that triggers the issue: USB_FS/HS, SPIx, UART/USARTx, and others. Description:When I add a new peripheral or middleware in STM32CubeMX and generate code, CubeMX creates an empty folder or generates incomplete peripheral and/or middleware output.The issue appears repeatedly with the same pattern and is not random. In the first case: Create or open project in CubeMX. In Project Manager / Code Generator, set: "Generate peripheral initialization as a pair of .c/.h files per peripheral" = Disabled (default). Generate code. Add a new peripheral: USB_FS (and/or others). Generate code again. Open CubeIDE, then build. In the current situat
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
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
Can you help me check the issue of generating external falsh download files for my STNM32N647? Last time with your help, I successfully generated the burning file for MX25UM51245 using cubemx. However, due to this shortage, we replaced it with the external falsh of MX25LM51245 with pin2pin.For this replacement, we have modified VDDIO3 to 3.3 power supply on the hardware. I used the software based on the MX25UM51245 file and modified the IO voltage configuration of the PWR. The VDDIO3 of the PWR has been configured to 3.3V, and the XSPI remains the same as before, using 100MHz.The burning file generated using this configuration cannot download MX25LM51245 now. * I have confirmed that the OTP124 of the chip used remains at 0.https://community.st.com/stm32cubeprogrammer-mcus-30/stm32n647z0-failed-to-create-the-download-file-for-mx25um51245-external-flash-167199
Reporting two issues when using STM32CubeMX v6.16.1 to generate STM32N6 code. I created new secure only template project for STM32N6570-DK to demonstrate the issue (it's attached).Only changes to the new project are these:In MMT defined RAM2 area over AXI SRAM3-6. Also check the "Apply Application Regions Settings to Peripherals".Then activated RIF for FSBL:Now generate code.It generates FSBL\Core\Src\main.c function SystemIsolation_Config(void).There are two function calls that cause assert failure because they violate the HW capability: /* set up base region configuration for CPUAXI_RAM0*/ /* region2 is secure */ risaf_base_config.EndAddress = 0x1003ff; risaf_base_config.StartAddress = 0x00000400; HAL_RIF_RISAF_ConfigBaseRegion(RISAF2, RISAF_REGION_2, &risaf_base_config); /* set up Sub region configuration for CPUAXI_RAM0*/ risaf_sub_config.EndAddress = 0xfffff; risaf_sub_config.StartAddress = 0x00000400; HAL_RIF_RISAF_ConfigSubRegion(RISAF2, RISAF_REGION_2, RISAF_S
> 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
I'm using Stm32CubeMx 6.18.0 on whole clean new Windows system. When I try to open New Project from Board It is downloading some file initially and when search for HTTP server it fails with error I typed at Title. I follow other releated topics suggestions to change directory and proxy server but its still fails. What should I doCurrently New Project from a Board UI opened, but still when I select a board or click tabs there, it is giving following error: `Error during Data Refresh - Download has failed, some data may be not updated. Please retry later`
While using LPBAM in U5 series, it can only access to the SRAM4, but the official course of LPBAM just gives a solution of changing the address of RAM to SRAM4 in ld file. But this makes us can only use 16k SRAM4, not enough for many applications. And the cubeMX code is not setting in SRAM4 as default, is there any setting that I missed to set those?I have a solution in code but not a very perfect one.Put these to .ld file before “_sidata = LOADADDR(.data)”, this will put all variables of LPBAM in SRAM4: .lpbam_sram4 :{ . = ALIGN(4);__lpbam_sram4_start = .; ./LPBAM*.o(.data .data* .bss .bss* COMMON) . = ALIGN(4); __lpbam_sram4_end = .;} > SRAM4the ./LPBAM* is used to match the LPBAM application folder. And I found another problem, for the SRAM4 is not initiated in startup. so we need to put those before main(){}, to initiate the SRAM4 variables, or there will be errors:/* USER CODE BEGIN PV */extern uint8_t __lpbam_sram4_start;extern uint8_t __lpbam_sram4_end;/* USER CODE END P
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.
When enabling USB_OTG_FS peripheral in Device_Only mode for STM32H743VIT6, CubeMX generates usb_otg.c with incorrect HAL macros:Generated (wrong) Should be (H7-native) GPIO_AF10_OTG1_FS GPIO_AF10_OTG2_FS __HAL_RCC_USB_OTG_FS_CLK_ENABLE __HAL_RCC_USB2_OTG_FS_CLK_ENABLE __HAL_RCC_USB_OTG_FS_CLK_DISABLE __HAL_RCC_USB2_OTG_FS_CLK_DISABLE Root cause: On STM32H7, the FS USB peripheral is USB2_OTG_FS, not USB1_OTG_FS. The H7 HAL defines GPIO_AF10_OTG2_FS for the FS port and GPIO_AF10_OTG1_HS for the HS port. CubeMX, however, generates F4/F7-style macro names (e.g. GPIO_AF10_OTG1_FS) which are only valid for MCUs with a single USB OTG peripheral. Moreover, GPIO_AF10_OTG1_FS is conditionally defined in stm32h7xx_hal_gpio_ex.h only when USB2_OTG_FS is not defined. Since STM32H743 does define USB2_OTG_FS, the macro is absent at compile time. The legacy compatibility aliases in stm32_hal_legacy.h could resolve this, but CubeMX does not include that header in the generated code.No
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
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
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.