cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX as a standalone application

ATank.1
Associate III

Hello,

I wanted to use the TouchGFX as a standalone simulator application which simulates a hardware.  

Following requirements should be fullfilled,

1. TouchGFX should be able to compile an existing FreeRTOS application on PC only and run a frontend GUI which will send values from the user interface to FreeRTOS tasks.

2. Consider 2 TouchGFX applications.

TouchGFX simulator application 1 should be able to communicate with TouchGFX simulator 2 application using some socket or virtual port concept.

As TouchGFX uses MINGW as compiler any FreeRTOS for windows or sockets should compile and run sucessfully.  Please confirm if above 2 points are possible using TouchGFX

Thanks 

Anuj

    

 

1 ACCEPTED SOLUTION

Accepted Solutions
GaetanGodart
ST Employee

Hello @ATank.1 ,

 


1. TouchGFX should be able to compile an existing FreeRTOS application on PC only and run a frontend GUI which will send values from the user interface to FreeRTOS tasks.


Yes.

Some more information about TouchGFX : since you want the application to be on your PC only, you should use the simulator for that. The only difference between the simulator and a real application is (in addition to the compiler and target) that TouchGFX creates a framebuffer in both case but on target touchGFX will also link that framebuffer to the pixels (memory) of the screen while on the simulator, the framebuffer is displayed using SDL.

As per the front end GUI that send values, sending values is not handled by TouchGFX but should probably be handled in the main.c or in some extra task handled by the RTOS.

 


2. Consider 2 TouchGFX applications.


It is indeed possible to run two simulators from 2 different projects on a single PC.

 


TouchGFX simulator application 1 should be able to communicate with TouchGFX simulator 2 application using some socket or virtual port concept.


As mentioned, this should be handled by the RTOS. You could for instance include socket.h to handle your message transfer. Then it is just a question of sending (and waiting for application 1) message to a virtual port for instance.

 

It sounds like a fun yet complex project, keep us updated on the advances!

 

If the message answered your question, I invite you to select it as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

3 REPLIES 3
GaetanGodart
ST Employee

Hello @ATank.1 ,

 


1. TouchGFX should be able to compile an existing FreeRTOS application on PC only and run a frontend GUI which will send values from the user interface to FreeRTOS tasks.


Yes.

Some more information about TouchGFX : since you want the application to be on your PC only, you should use the simulator for that. The only difference between the simulator and a real application is (in addition to the compiler and target) that TouchGFX creates a framebuffer in both case but on target touchGFX will also link that framebuffer to the pixels (memory) of the screen while on the simulator, the framebuffer is displayed using SDL.

As per the front end GUI that send values, sending values is not handled by TouchGFX but should probably be handled in the main.c or in some extra task handled by the RTOS.

 


2. Consider 2 TouchGFX applications.


It is indeed possible to run two simulators from 2 different projects on a single PC.

 


TouchGFX simulator application 1 should be able to communicate with TouchGFX simulator 2 application using some socket or virtual port concept.


As mentioned, this should be handled by the RTOS. You could for instance include socket.h to handle your message transfer. Then it is just a question of sending (and waiting for application 1) message to a virtual port for instance.

 

It sounds like a fun yet complex project, keep us updated on the advances!

 

If the message answered your question, I invite you to select it as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
t.decker
Senior II

I can confirm that it is possible to run FreeRTOS as part of the TouchGFX Simulator. I created a application for editing the target configuration (exchanging config files with USB storage device between target and Simulator). I used a lot of "#ifdef SIMULATOR" and exclude from build, so the codebase is the same and I just create two binaries.

You can add whatever you want to the Simulator code (socket communication). I use FileOpen/FileSave dialogues and file handling from windows API.

When this account seems to be inactive, try @tdecker2 - ST can't change mail addresses, so I had to create a new account.

Hello,

Thanks for letting me know. I my case the simulator should be able to simulate all the functionality of the target hardware. Plan to simulate inputs by TouchGFX and communication between different boards which happens through CAN/SPI interfaces on target using sockets on simulator

Regards,

Anuj