Skip to main content
HAnh
Associate III
December 16, 2024
Question

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

  • December 16, 2024
  • 3 replies
  • 625 views

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?

3 replies

MM..1
Chief III
December 16, 2024

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

GaetanGodart
Technical Moderator
December 17, 2024

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,

GaetanGodart
Technical Moderator
January 21, 2025

Hello @HAnh ,

 

Have you been able to move forward on this?

 

Regards,