2026-01-02 11:47 PM
Dear ST Community Team,
I am working on a project using the STM32N657X0H3Q1 MCU with TouchGFX for GUI development.
After configuring TouchGFX and generating the code, I am encountering RAM and ROM overflow errors during the build/link stage.
MCU: STM32N657X0H3Q1
External RAM: S80KS5123GABHB020
External Flash: S28HS512TGABHM0100
Both the external RAM and external Flash are connected externally on the board and are intended to be used for the TouchGFX application.
After TouchGFX configuration and code generation, the linker reports errors such as:
Internal RAM overflow (data/bss/heap/stack)
Internal Flash (ROM) overflow due to TouchGFX assets
It appears that TouchGFX frame buffers, heap, or graphic assets are still being placed in internal RAM/Flash, instead of using the available external RAM and external Flash.
How should external RAM (S80KS5123GABHB020) be configured so that:
TouchGFX frame buffers
Heap and large buffer are allocated in external RAM?
How should external Flash (S28HS512TGABHM0100) be configured so that:
TouchGFX images, fonts, and asset are placed in external Flash instead of internal Flash?
What TouchGFX Designer settings are required for STM32N657 to avoid RAM/ROM overflow?
What linker script (.ld) modifications are required to correctly map TouchGFX sections to external memory?
Is there any reference project, example, or application note for STM32N657 using TouchGFX with external RAM and external Flash?
This are errors we are getting
13:12:26 **** Clean-only build of configuration Debug for project stm32n6_display_FSBL ****
-l:libtouchgfx-float-abi-hard.a -mcpu=cortex-m55 -T"D:\HDFD_N6\stm32n6_display - Copy\FSBL\STM32N657X0HXQ_AXISRAM2_fsbl.ld" --specs=nosys.specs -Wl,-Map="stm32n6_display_FSBL.map" -Wl,--gc-sections -static -Wl,--cmse-implib -Wl,--out-implib=./secure_nsclib.o -L"D:\HDFD_N6\stm32n6_display - Copy\FSBL\Middlewares\ST\touchgfx\lib\core\cortex_m55\gcc" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: stm32n6_display_FSBL.elf section `TouchGFX_Framebuffer' will not fit in region `RAM'
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: stm32n6_display_FSBL.elf section `TouchGFX_Framebuffer' will not fit in region `ROM'
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: section .gnu.sgstubs VMA [34295980,3429599f] overlaps section TouchGFX_Framebuffer VMA [341c00f0,342aa6ef]
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: region `ROM' overflowed by 874912 bytes
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 707216 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:102: stm32n6_display_FSBL.elf] Error 1
"make -j6 all" terminated with exit code 2. Build might be incomplete.
Any guidance on the correct memory configuration flow for TouchGFX on the STM32N6 series would be greatly appreciated.
Thank you for your support.
Best regards,
Marka