Skip to main content
AWack
Associate III
November 19, 2024
Solved

General concept for non-GUI user code in TouchGFX

  • November 19, 2024
  • 2 replies
  • 744 views

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

Best answer by GaetanGodart

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,

2 replies

GaetanGodart
GaetanGodartBest answer
Technical Moderator
November 19, 2024

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,

GaetanGodart
Technical Moderator
December 10, 2024

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,