cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX frameBuf location

sute
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
sute
Associate III

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.

View solution in original post

1 REPLY 1
sute
Associate III

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.