cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX with Zephyr RTOS on STM32H745

devanshu5
Associate III

Hi Community,

We are exploring the migration of our FreeRTOS-based firmware to Zephyr. Our current design heavily relies on TouchGFX (provided by ST) for controlling an 800×480 touch display.

Here are some key details of our setup:

  • TouchGFX with external SDRAM for a double frame buffer using the FMC peripheral
  • Images, fonts, and text stored in external QSPI Flash
  • LTDC controller in use
  • DMA2D accelerator enabled
  • RGB image compression utilized

Is there any sample application or detailed documentation available for achieving this on Zephyr?

I have already briefly reviewed the following resources:

However, I need more guidance, specifically:

  • Examples or reference projects for TouchGFX on Zephyr
  • Detailed documentation on integration steps

We have a tight project deadline, so I need to quickly determine:

  1. Whether TouchGFX can work with Zephyr
  2. How complex the migration effort would be

Any insights, references, or experiences would be greatly appreciated.

Regards,
Devanshu Agarwal

16 REPLIES 16

Hi @mathiasmarkussen ,

I built and ran the TouchGFX Zephyr app on the STM32H745I‑DISCO board. The app displays basic buttons, text, and screens as expected. I am still testing to verify additional functionality.

When I enable image compression in TouchGFX Designer, images are not displayed correctly. An image appeared once when the screen first opened but disappears during subsequent screen transitions. Some images never appear at all.

This is critical for us because our product has limited external flash. Can you help troubleshoot this issue?

mathiasmarkussen
ST Employee

Hello,

Did you do any modifications to the project, or did you just build for a different board?

I have hardware available to test it, so can you share your project, if you have modified it?

I made several modifications to get it working on the STM32H745.
Could you please share your email address? I’ll send you the project via email and also include the other ST members I’ve been in touch with.

Jazman
Associate III

All - I am also very interested in this subject.  I had started a thread back in 2024 asking about Zephyr and TouchGFX integration but didn't really get any assistance.  I've used TouchGFX on multiple projects and it's great.  But, we're really looking to go with Zephyr for the OS because of the other things it brings to the party (ie: IP stack for example).  I know many companies are moving forward with Zephyr as well.

My 2024 thread: https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/zephyr-and-touchgfx/td-p/674902

I do have an STM32H747I-DISCO board.  This is very similar to the 745 with additional hardware and dual core.

Would love any information you'd be willing to share.  Would also love to see ST officially make support for Zephyr available.  I realize you probably can't make it part of the Zephyr distribution since it's ST part specific, but having instructions on how ST customers can use ToughGFX with Zephyr would be grand!

 

Thanks in advance!

devanshu5 - Are you able/willing to share your project for the STM32H745?  It would be awesome to use this as a learning/starting point to see how you integrated TouchGFX with Zephyr.

THANK YOU IN ADVANCE!

Keith

Hello Mathias - So I've been working to understand how this project was created.  It looks like you pulled the gpu2d directories out of the Middleware directory from generated HAL code (assuming generated with CubeMX).  

I was trying to update the project to TouchGFX 4.26.1 but the engines don't get updated by the designer as the CubeMX does that when you update the installed software packages and generate code.

I'm not really sure of all the Cube settings for the code generator for the U5G9-DK2 board.  Can you share the CubeMX file that you originally used to generate this project?  I can then update as I see fit and go from there.

Really pretty new to zephyr so this skirting the line with half and half is challenging.  Having a good starting point to figure out and understand exactly how you guys got to this point will help me implement this on my own stuff.

Would really prefer to stick with TouchGFX instead of switching to LVGL or something else.  It has served me well, does a great job and I know it well.  But Zephyr is bringing along some other integration pieces (TCP/IP for example) and is supported by many of the peripheral hardware vendors so I really think I need to go that way.

Thanks in advance,

Keith

Hello Jazman,

You are definitely on the right track, I did just pull the TouchGFX folder out of a project generated with CubeMX, added a cmakelists.txt and changed a few lines to make the generator put the tougfx and nema libraries in TouchGFX/lib instead of /Middlewares.

The libraries should be updated when generating code in the designer, if that does not happen you should be able to just delete them and regenerate.

The part that gets generated by CubeMX is the stuff in /TouchGFX/target/generated.

The project I used was just the TBS we ship for the U5G9J-DK2 with TouchGFX Designer. I think you can replace that entire folder if you create a new project of the STM32U5G9J-DK2 FreeRTOS TBS, but I would probably just not update the OSWrapper.cpp, in which case the OS of the "donor" TBS does not matter.