cancel
Showing results for 
Search instead for 
Did you mean: 

如何修改螢幕緩衝暫存大小?

yu_jay
Visitor

TouchGFX 4.18.0 Designer輸出畫面,STM32CubeIDE編譯並燒錄,但因為螢幕元素(按鈕、文字、圖片修改)過多,導致螢幕崩潰並重新啟動,推測是螢幕緩衝暫存記憶體溢出導致,確認不是程式邏輯問題,刪除一些螢幕元素就能正常顯示,如何修改螢幕緩衝暫存大小?或是如何修正此問題呢?

 

1 REPLY 1
GaetanGodart
ST Employee

Hello @yu_jay ,

 

Please, for your following message, write in English so that I and the rest of the community can understand what you say. 😊

 

I Google translated your message.
It seems you have memory issues crashing and restarting your board due to too many widgets on a specific screen and removing some of those widgets makes the design work.
It would help me to know what widgets you remove for it work again.
What hardware you are using?
Why are you using TouchGFX 4.18 and not the most recent version? Can you upgrade to the most recent version?
Also, what happens if you start the GUI on a simple screen and then switch to the screen with too many widgets?
Finally, when the board restarts, does it works after or does it constantly restart?

 

At the top right of TouchGFX Designer, you can increase the Canvas Buffer:

GaetanGodart_0-1721031533296.png
This is used for lines, boxes, SVG images etc but not for all the widgets.

Another solution would be to increase the TouchGFX heap in the linker script (in the "gcc" folder, the file with the LD extension):

GaetanGodart_1-1721031966635.png
You can increase the minimum heap and stack from there.

A final solution is to increase the FreeRTOS stack size (if you use FreeRTOS) in the .ioc file :

GaetanGodart_2-1721032075607.png

 

If this comment answers your question, I invite you to select it as best answer.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)