cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Support Needed: Adding more than 6 elements to a scroll list causes code to hang at void_exit(init status).

Nandagopal
Associate II

Hi ST Community,

Thank you so much in advance for your timely support.

  • I am developing a Touch GFX GUI on the STM32H7B3I-DK Discovery Board.

  • Code was generated by Touch GFX itself with Cube MX with modifications done by me on STM32 Cube IDE. Free RTOS is used.

  • I have 2 screens. One screen is an ADD screen where the user can add one or more 'procedures' with a unique name. The second screen is a LIST Screen where it displays a Scroll list of all the procedures that the user has added.

  • For example: The user goes to the ADD screen and adds a procedure by providing a name "Procedure 1" and then adds another procedure with the name "Procedure 2". If he goes to the LIST Screen. He will see Procedure 1 and Procedure 2 listed on the scroll list.

  • I have implemented this using the Scroll List Container that is available in Touch GFX. The list item for this Scroll List is a custom container that has a text field. The Scroll list is designed to update the number of list items and the text fields of each list item every time the LIST Screen is called. This is done on the Setup function of the LIST Screen.

  • The issue I am facing: if add 6 Procedures on the ADD Screen and go to the LIST Screen, I will see the 6 Procedures with their unique names as list items. When I add the 7th Procedure and try to go to the LIST Screen, The code hangs.

  • I have found that the code execution goes to this function in the syscalls.c and this causes the hang
void _exit (int status)
{
	_kill(status, -1);
	while (1) {}		/* Make sure we hang here */
}
  • If you require any more info, I will be happy to provide.

Regards,

Nandagopal

1 ACCEPTED SOLUTION

Accepted Solutions
Nandagopal
Associate II

I figured it out everyone !

Sharing my findings in case anyone finds it helpful.

The Touch GFX generated code declares the scroll list with a fixed size of 6 as shown. This is in theViewbase.hpp file of the corresponding screen in the generated code/

touchgfx::DrawableListItems<Procedure_List_Item, 6> scrollList1ListItems;

This in my case prevents me from updating the scrollList1ListItems manually for each index.

Even if I update the scrollList1.setNumberOfItems(). It does not reflect in the array size of the scrollList1ListItems.

I was treating the scrollList1ListItems as an array I can call in my setup function of the screen. The moment I call the 7th element, code exceeds the prescribed size. and goes to the exit() function as said.

What I have to do is override the generated scrollList1UpdateItem function and update the text fields from there. Whenever I call the scrollList1.setNumberOfItems() function. TouchGFX will automatically call the scrollList1UpdateItem function for every list item in the scroll list.

Doing this has fixed the issue for me!

Thank you all

Regards,

Nandagopal

View solution in original post

3 REPLIES 3
JTP1
Lead

Hello.

Have you set enough big number as 'number of items' in scroll list ?

How do you share the added elements between ADD screen and LIST screen, maybe there is some problem.

Nandagopal
Associate II

I figured it out everyone !

Sharing my findings in case anyone finds it helpful.

The Touch GFX generated code declares the scroll list with a fixed size of 6 as shown. This is in theViewbase.hpp file of the corresponding screen in the generated code/

touchgfx::DrawableListItems<Procedure_List_Item, 6> scrollList1ListItems;

This in my case prevents me from updating the scrollList1ListItems manually for each index.

Even if I update the scrollList1.setNumberOfItems(). It does not reflect in the array size of the scrollList1ListItems.

I was treating the scrollList1ListItems as an array I can call in my setup function of the screen. The moment I call the 7th element, code exceeds the prescribed size. and goes to the exit() function as said.

What I have to do is override the generated scrollList1UpdateItem function and update the text fields from there. Whenever I call the scrollList1.setNumberOfItems() function. TouchGFX will automatically call the scrollList1UpdateItem function for every list item in the scroll list.

Doing this has fixed the issue for me!

Thank you all

Regards,

Nandagopal

Thank you JTP for taking the time to respond.

I have solved it. It was a different issue. Please see my findings on the thread.

Regards,

Nandagopal