Skip to main content
sute
Associate III
July 4, 2022
Solved

TouchGFX frameBuf location

  • July 4, 2022
  • 1 reply
  • 983 views

Hello, we are having trouble with our application binary size. Inspecting the binary, I noticed that TouchGFX frameBuf is stored in .data section, meaning that it takes about 150kB of flash space in addition to RAM space. Is it possible to store frameBuf in .bss so that flash space is not used? If I understand correctly, it could be initialized to just zero? According to documentation:

> Use the section "TouchGFX_Framebuffer" in the linker to specify the placement of the buffer

but I have not been successful trying to modify the linker script

This topic has been closed for replies.
Best answer by sute

I think I was able to solve this issue. Initially I placed the following snippet after .bss section in the linker script:

 TouchGFX_Framebuffer (NOLOAD):
 {
 . = ALIGN(4);
 *(TouchGFX_Framebuffer)
 *(TouchGFX_Framebuffer*)
 } >RAM

This caused a BusFault in my application. Then I placed the snippet before .bss section, and suddenly it worked. I really have no idea why.

1 reply

sute
suteAuthorBest answer
Associate III
July 4, 2022

I think I was able to solve this issue. Initially I placed the following snippet after .bss section in the linker script:

 TouchGFX_Framebuffer (NOLOAD):
 {
 . = ALIGN(4);
 *(TouchGFX_Framebuffer)
 *(TouchGFX_Framebuffer*)
 } >RAM

This caused a BusFault in my application. Then I placed the snippet before .bss section, and suddenly it worked. I really have no idea why.