cancel
Showing results for 
Search instead for 
Did you mean: 

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

BParh.1
Senior III

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.

6 REPLIES 6
Ozone
Lead

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.

MM..1
Chief II

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.

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

BParh.1
Senior III

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?

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.

The docs mentioned there is no dynamic memory allocation in TouchGFX platform so I dont think there is malloc.

Anyway, I read again the doc, I think the following explain why I could not find the frame buffer in map file

"The only thing placed in external RAM is the framebuffers. These cannot be found in the linker script as they are not defined as variables in the application"

https://support.touchgfx.com/docs/basic-concepts/memory-usage