Skip to main content
VSimu.1
Associate III
April 21, 2021
Question

SwipeContainer Pages use too much .bss memory

  • April 21, 2021
  • 9 replies
  • 1787 views

Hello,

We have almost finished a product using touchgfx. We have 512k internal RAM on our stm32f767.

Based on profiling the linker file, 360k of our program .bss goes into internal RAM. Of that 360k .bss, a staggering 320k is only from SwipeContainer pages.

We recently tried to increase the number of pages of our SwipeContainer from 5 pages to 32 pages. But this would not fit. (Trying to compile, the application would not link). Now we are using 16 pages and we were able to calculate that every Swipe Container page uses about 20k .bss

Every single page of our 16 pages is the exact same custom container. It is copied 16 times 1-to-1. But with every extra page, there is 20k more internal RAM used.

Can you help me please? Is this normal? By decreasing the Wildcard buffer of one of the Text Areas inside of the custom container (where the TextArea is repeated about 16*7 = 112 times) from size 80 to 20, we were able to reduce the .bss size by about 50k! So please any hints on how to reduce this? Of course we can dynamically allocate everything, but we want to stay within the touchgfx philosophy and not use any dynamic memory for this big stuff.

Every 1 custom container (i.e. every Page of the SwipeContainer) has: 7 dynamic graph widgets, 35 Wildcard TextAreas of size up to 20, various buttons, various images from image assets, 21 buttons. But nothing crazy, it's not like a video game. It's pretty much all very static.

We noticed that our Windows Simulation .exe file also increased from 40kB to 50Bk, after increasing the number of pages from 5 to 16.

Any tips, hints, experience, etc would be very helpful and appreciated.

Regards

This topic has been closed for replies.

9 replies

MM..1
Super User
April 21, 2021

Maybe better for your design is use swiping between screens and create many screens .

VSimu.1
VSimu.1Author
Associate III
April 21, 2021

This is not possible to change at this point.

And as far as the program. It is easier to have 1 Model with 1 View controlling 1 swipe container with 16 pages. Than to have 1 Model with 16 Views controlling 1 custom container which emulates the existing SwipeContainer

This is the whole point of having the SwipeContainer, at least to my understanding...

MM..1
Super User
April 21, 2021

Yes but screen objects is loaded to memory = swipe container load all elements...

When you need swipe you can use only two screens and change dynamic what is show for unlimited amount swiping...

Maybe ScrollList is better managed it generate only visible count custom containers, then when you use horizontal scroll ...