cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Crash with multiple text boxes

justin11
Senior

Hi,

I have a custom board project which I have been running for over a year and im looking to add some features to the layout. The screen is a 240x320 layout and the MCU is a STM32H757. I am running touch GFX 4.20 and it will be difficult for me to upgrade from this due to the ties within the cubide and code base.

Im looking to add a page with multiple test boxes,as i need to update sensor readings to the screen. Originally i built this in custom containers as i would normally, but it kept crashing on creating on the new page. So i have worked back making the page more and more simple untill i found a threashold of it occuring when i have 38 default text boxes on the screen (see pic), the text boxes have no buffers allocated to them and this is on a fresh screen so no functions or code running.

if i lower the number of text boxes to 34 its fine.

is this a limitation of 4.20 ?

I've tried increasing the canvas buffer and rtos heap and task memory but nothing resolves this crash (HardFault exception), i've attached the memory address in the diassembler.

 

 

Screenshot 2024-10-25 185641.png

justin11_0-1729879736002.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Im running an STM32H757 so i should have pleanty of RAM

I think i have managed to resolve this. I changed the following task buffer size. this was originally 1024. no changing it to 2048 i've not seen the crashes.

// frertos.c

uint32_t guiBuffer[2048]; // Increase buffer size for gui task

// Update thread definition for gui

osThreadStaticDef(gui, Gui_Task, osPriorityNormal, 0, 2048, guiBuffer, &guiControlBlock);

View solution in original post

19 REPLIES 19
ferro
Senior III

Hi @justin11 , what does function call stack say ?

justin11
Senior

justin11_1-1729891253995.png

 

This is the call stack at the point it crashed

justin11_0-1729891184598.png

 

 

ferro
Senior III

72 == sizeof ( touchgfx::TextArea )

 

 

if i lower the number of text boxes to 34 its fine.

 

72*34 = 2448 bytes

So you are creating them on heap. Does this happen if you add them from an array of lets say 50 TextArea ?

Thanks. This does not look familiar sorry. So is this the only screen you,ve got ? are you adding TextAreas in GfxDesigner so they are in Base class ? You mantioned heap so probably not.

I have other screens (approve 14) as mentioned this is a live project and never had an issue like this.

i did try to delete some screens to lighten the loading but it didn’t help.

i created these text fields via touchgfx, so yes they are in the base class.

>> "i created these text fields via touchgfx, so yes they are in the base class."

Ah Okay, I thought you create screns on heap as you said "I've tried increasing [...] rtos heap and task memory but nothing resolves this"

I am not aware of any limitation on drawables added to a screen. Maybe you exhaust your RAM ?

You could check size of screens. This compiler error will tell you the size

char (*ee)[ sizeof ( Here_name_of_SreenView ) ] = 1;

 

Hi,

When using the command i get a result of 8396. This is actually now on a different page, which is also very much on the edge of the crash threashold.

Where should i look to increase any memory allocations ? should i be looking in the touchgfx project or freertos ?