2024-10-25 11:14 AM
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.
2024-10-25 01:15 PM
Hi @justin11 , what does function call stack say ?
2024-10-25 02:06 PM - edited 2024-10-25 02:21 PM
2024-10-25 02:18 PM
2024-10-25 02:20 PM
This is the call stack at the point it crashed
2024-10-25 02:24 PM - edited 2024-10-25 02:27 PM
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 ?
2024-10-25 02:38 PM - edited 2024-10-25 02:39 PM
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.
2024-10-25 11:21 PM
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.
2024-10-27 12:52 PM
>> "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;