Skip to main content
BParh.1
Senior III
April 26, 2021
Question

Where can I find the generated code base the size of allocated framebuffer?

  • April 26, 2021
  • 6 replies
  • 997 views

So I browse around the generated code from TouchGFX Designer template, I can find where the frame buffer address is defined, however I could not find the size of it, can someone give me some pointer please?

void TouchGFXGeneratedHAL::initialize()
{
 HAL::initialize();
 
 registerEventListener(*(Application::getInstance()));
 setFrameBufferStartAddresses((void*)0xC0000000, (void*)0, (void*)0);
 /*
 * Set whether the DMA transfers are locked to the TFT update cycle. If
 * locked, DMA transfer will not begin until the TFT controller has finished
 * updating the display. If not locked, DMA transfers will begin as soon as
 * possible. Default is true (DMA is locked with TFT).
 */
 lockDMAToFrontPorch(true);
}

 I want to verify that my buffer size is indeed according to stated in this docs

https://support.touchgfx.com/docs/basic-concepts/framebuffer/#amount-of-framebuffers

My intention was to verify that the buffer size should be reduced if I reduced my color depth.

This topic has been closed for replies.

6 replies

Ozone
Principal
April 26, 2021

Relevant information about all the objects involved in an application are listed in human-readable form in the map file.

Including address and size.

It is created optionally by the linker, details depend on your toolchain.

BParh.1
BParh.1Author
Senior III
April 27, 2021

Thanks @Ozone​ , I took a look the .map file, it seemed only to show information for internal memory but my framebuffer is on external RAM

Ozone
Principal
April 27, 2021

If this framebuffer allocation boils down to a malloc call, it will not turn up in the map file.

You could use an ASSERT macro, or a similar check.

MM..1
Super User
April 26, 2021

I mean @Ozone​ miss , TouchGFX code allocation by address mean you use external SDRAM and only for buffer. Then size is dont checked or allocated. Defined is only start 0xC0000000. You can change this or define regions in linker script usw...

Too you hav esecond choice set framebuffer by allocation, here you see size , but need use section linker definition.

BParh.1
BParh.1Author
Senior III
April 27, 2021

Another way to ask here is how can I see in the code the mechanism in which the memory is consumed to generate the image on the display?