343 views
in Platform Packages by
I'm working on an NXP iMXRT1062 based system with a 4.3" 272x480 LCD touch display.
Using the RGB565 color profile, I need (272x480x2) 255Kbytes for each of the two screen buffers, which makes sense to me.
With a very simple 4 screen project, I'm seeing heap usage of  around 296Kbytes, which is much more than I would have expected. Is there any way to minimize the amount of heap used/needed?

Thanks,

Dale

1 Answer

0 votes
by

Hi Dale,

it is difficult to analyze the memory footprint of your application without knowing your application and your target configuration.

Parts of the memory are allocated from the system in order to run a GUI application (e.g. the issue buffer is allocated in order to process the graphics instuctions, or the glyph cache is allocated to cache the font glyphs for displaying strings) and there are memory block allocated by the GUI application itself.

For example, the glyph cache is configured per defaullt to a size of 256x256 pixel (see ewconfig.h EW_MAX_GLYPH_SURFACE_WIDTH and EW_MAX_GLYPH_SURFACE_HEIGH). This cache allocates 64kByte.

If your application contains one or more bitmap resources - then they are loaded during runtime into the memory.

Within Embedded Wizard Studio (since version 9.30) you can get an estimation of the memory usage - this helps to analyze your GUI application.

Maybe you can provide more information about your target (the available memory) and your GUI application to give you better advices.

But finally to answer your question: There is no typical heap usage - most of the memory usage is completely dependent on the GUI application itself.

Best regards,

Manfred.

by
Hi Manfred

Thanks for getting back to me so quickly.

I've completed the layout of most of the remaining screens for my application to get a better feel for the RAM requirements, and the peak RAM use is about 2.2MB, mostly due to bitmap objects.

Is there any way to prevent these bitmaps from being loaded into RAM? Can they be referenced from their Flash locations?

Thanks.
Dale
by

Hi Dale,

of course, you can use DirectAccess for your bitmap resources in order to avoid that they are loaded into RAM during runtime. In this case, the bitmap resources are stored uncompressed within the Flash memory so that they can be drawn directly from Flash into the framebuffer.

Please note that the Flash access might be slower than SDRAM access and (depending on the color format and the amount of bitmap data) the memory bandwidth can become an issue. But in most cases the DirectAccess works fine on iMXRT1050/60/64 targets.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...