2021-04-26 02:25 AM
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.
2021-04-26 04:00 AM
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.
2021-04-26 06:38 AM
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.
2021-04-26 08:40 PM
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
2021-04-26 08:41 PM
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?
2021-04-26 11:23 PM
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.
2021-04-26 11:30 PM
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