2026-01-14 12:11 AM - last edited on 2026-01-14 3:21 AM by Andrew Neil
Hello,
I am experiencing a flash upload issue with STM32CubeIDE(v1.19.0).
The MCU I am using is STM32C091GCU6 with 256 KB of internal Flash.
I am currently developing code to display image (IMG) data on an LCD.
The image data is stored in Flash, copied to SRAM using memcpy(), and then transmitted to the LCD via SPI DMA.
From the MAP file, I can confirm both the Flash addresses of the image data and the SRAM copy destination.
The relevant MAP file entries are shown below:
.rodata.IMG_HORIZONTAL
0x08004840 0xfd20 ./Core/Src/font.o
0x08004840 IMG_HORIZONTAL
.rodata.IMG_VERTICAL
0x08014560 0xfd20 ./Core/Src/font.o
0x08014560 IMG_VERTICAL
After this configuration, when I build and debug using STM32CubeIDE, the reported uploaded memory size is only 128 KB.
Because my code accesses image data located above the 128 KB Flash boundary, a HardFault occurs when running under CubeIDE debug.
However, when I take the same build output file and program it using STM32CubeProgrammer(v2.19.0), the firmware is correctly written beyond 128 KB, up to the proper Flash size, and the code runs without any issues.
Summary
When building and debugging in STM32CubeIDE, only 128 KB of Flash is programmed
The same build output, when flashed using STM32CubeProgrammer, works correctly
When connecting the board in STM32CubeProgrammer, the detected Flash size is correctly shown as 256 KB
The FLASH.ld file in STM32CubeIDE is correctly configured for 256 KB Flash
Has anyone experienced a similar issue?
I would appreciate any guidance or suggestions on how to resolve this problem.
Thank you.
2026-01-14 12:28 AM - edited 2026-01-14 12:38 AM
Hello @gg_silver96
Yes, I confirm that this issue exists in STM32CubeIDE 1.19.0 and has been escalated to the development team under internal ticket 213275. It has been fixed in the latest release, STM32CubeIDE 2.0.0.
Link to download STM32CubeIDE 2.0.0 in case of need :STM32CubeIDE | Software - STMicroelectronics
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-01-14 12:34 AM
> When building and debugging in STM32CubeIDE, only 128 KB of Flash is programmed
> The same build output, when flashed using STM32CubeProgrammer, works correctly
This sounds like CubeIDE has a wrong memory definition file for your MCU variant.
I had something similiar with a C031 a while ago, in the SeggerES toolchain.
However, this toolchain has the memory definitions created from ST's SVD files AFAIK.
And the CubeProgrammer comes with it's own set of SVD files.
2026-01-14 1:12 AM
In my case, the respective file was copied into the project and thus became part of it.
And for the RAM size was incorrect, thus the stack included non-existing RAM, and the application failed at startup.
Not sure how it is handled within Cube IDE.
You can at least check and probably edit the respective in the CubeIDE context.
2026-01-14 2:46 AM
@Ghofrane GSOURI wrote:It has been fixed in the latest release, STM32CubeIDE 2.0.0.
@gg_silver96 Note that STM32CubeIDE 2.0.0 no longer integrates CubeMX - it becomes a separate, standalone tool:
STM32CubeIDE 2.0.0 new workflow tutorial
IDE Version 2.0.0 - why remove MX ?
2026-01-14 2:48 AM
@Ghofrane GSOURI wrote:I confirm that this issue exists in STM32CubeIDE 1.19.0
Is it specific to STM32C091GCU6, or a general limit on any STM32 ?
2026-01-14 2:49 AM
Hello @Andrew Neil
it's only specific to STM32C091GCU6.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-01-14 3:22 AM
Probably a copy&paster error or typo while creating the SVD file for this specific MCU variant.
Such things happen.