Skip to main content
HAnh
Associate III
Dec 16, 2024 4:22 PM UTC
Question

STM32F412G-DISCO `FramebufferSection' will not fit in region `RAMFB'

Hi Everyone.

I use STM32F412G-DISCO to custom TFT 320x240 and set up the touchGFX the same.

HAnh_0-1734365665216.png

But when I generate the code it shows me the error "STM32F412G-DISCO.elf section `FramebufferSection' will not fit in region `RAMFB'

HAnh_1-1734365769742.png

HAnh_2-1734365893189.png

I checked in the flash file. the RAMFB is configurated 128K

I don't know how to fix this. Can anyone help me advice in this case?

This topic has been closed for replies.

3 replies

MM..1
Super User
Dec 16, 2024 4:35 PM UTC

Simply 320x240x2 = 150k  then cant fit into 128k

GaetanGodart
ST Employee
Dec 17, 2024 9:25 AM UTC

Hello @HAnh ,

 

As MM said, your framebuffer is too big for the size of your RAMFB.
The color depth of your pixels is RGB565 so 5+6+5 = 16 bits which is 2 bytes.
So you will need 240 * 320 * 2bytes = 153600 bytes.

You need to either :

  • reduce your color depth (not the best)
  • reduce your display size (probably not your goal)
  • increase your memory, maybe with an external memory

 

Regards,

Gaetan GodartSoftware engineer at ST (TouchGFX)
GaetanGodart
ST Employee
Jan 21, 2025 11:03 AM UTC

Hello @HAnh ,

 

Have you been able to move forward on this?

 

Regards,

Gaetan GodartSoftware engineer at ST (TouchGFX)