STM32C091GCU6: STM32IDE's flash upload is limited to 128KB.
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.
