cancel
Showing results for 
Search instead for 
Did you mean: 

General concept for non-GUI user code in TouchGFX

AWack
Associate III

Hi,

I´ve to start a project (with FreeRTOS) where several code has to be implemented which is not directly related to the GUI (some state machines, control algorithms, ...).

I´m not sure, if I should implement this code parts as usual in my FreeRTOS and exchange only GUI data with the model, or if I should implement also my non GUI related code in the model?

 

Best regards,

Achim

1 ACCEPTED SOLUTION

Accepted Solutions
GaetanGodart
ST Employee

Hello @AWack ,

 

Both would work.
You could include your main.h in the model.cpp to have access to the variables that are changed in main.c, this is straight forward and better for simple applications.
You could also use the RTOS if you have one which is great if you would need the semaphores / queue / other features of the RTOS so it is more suited for more complex applications.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

2 REPLIES 2
GaetanGodart
ST Employee

Hello @AWack ,

 

Both would work.
You could include your main.h in the model.cpp to have access to the variables that are changed in main.c, this is straight forward and better for simple applications.
You could also use the RTOS if you have one which is great if you would need the semaphores / queue / other features of the RTOS so it is more suited for more complex applications.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
GaetanGodart
ST Employee

Hello @AWack ,

 

Have you been able to move forward with your issue?
If you did, could you select the comment that helped you the most as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)