cancel
Showing results for 
Search instead for 
Did you mean: 

Problem displaying images with TouchGFX on STM32F746G-DISCO

Voidmain
Associate

Hello STMicroelectronics engineers and fellow users,

I recently purchased the STM32F746G-CU4 board and have been working on a project with it.

The STM32F746 is an excellent processor, and I was particularly interested in its ability to control a touch screen, which is why I bought this board. Yesterday, I finally managed to install the TouchGFX software and set up my development environment.

My plan today was to start by uploading a simple image to the display and then gradually research and practice the required features before integrating them into my equipment. TouchGFX has provided a very intuitive interface, and fortunately, I was able to upload an image to the board with just a few clicks. It is a very convenient environment for me.

However, I’ve encountered some problems.
When I downloaded the simplest images to the board (for example, just a plain white screen or a solid color), the screen displayed the color correctly. But when I uploaded the photo I wanted, the entire screen became corrupted.

I conducted several tests: adding text only, trying the provided clock image, using a 480x272 image, adding a diamond shape on a solid background, and so on.

Only two cases were successful: displaying a solid color, and displaying a diamond shape in the center. In all other cases, the screen became corrupted.

I’m not sure why this issue is happening, so I need help from the STMicroelectronics community.

Here is my development environment:

  • Board: STM32F746G-DISCO : DK32F746G-CU4

  • TouchGFX Designer: 4.25.0

  • STM32CubeIDE: Version 1.6.0 / 1.19.0

  • Windows 11 Pro

I look forward to your replies.
Thank you very much.

 

20250916_105145.jpg

20250916_104641.jpg

20250916_104216.jpg

20250916_104056.jpg

20250916_105343.jpg

Screenshot 2025-09-16 110213.pngScreenshot 2025-09-16 113501.png

  

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Voidmain ,

Generally, I advise to avoid using STM32CubeIDE for editing the ioc when it comes to a TouchGFX project because there is often issue paths of generated files for the toolchain (it must not be under the root). Our recommended tool for code generation is STM32CubeMX. Then I use STM32CubeIDE for code editing.
https://support.touchgfx.com/docs/development/touchgfx-hal-development/generator-how-to/generating-code#generated-project

Osman SOYKURT
ST Software Developer | TouchGFX

View solution in original post

3 REPLIES 3
LouisB
ST Employee

Hello @Voidmain,

Have you checked this thread Solved: STM32F746G Discovery: What is the difference betwe... - STMicroelectronics Community ?

BR,

Louis BOUDO
ST Software Engineer | TouchGFX

Hello Louise,

I’ve been trying various things by referring to ST manuals, YouTube videos, and a few blog posts on the web. Fortunately, I managed to download/flash a TouchGFX project to my STM32F746G-Discovery board and run it successfully!

What I did

  • Generated code in TouchGFX

  • Opened the STM32CubeIDE folder inside the project and launched the .project

  • STM32CubeIDE (v1.19.0) started and auto-imported the project

  • After building and running, the app worked on the Discovery board as expected

However, a new problem appeared.
I now want to add a USB_OTG_FS (CN13 / USB_FS) feature so that I can send/receive data between the board and a PC via a terminal. As usual, I opened the .ioc, assigned the pins, enabled USB_DEVICE, and clicked Generate Code—but nothing changed in main.c.

After spending the whole day trying different approaches, here is what I found:

  • Creating a project directly in STM32CubeIDE and testing USB communication between the board and PC: success

  • In the TouchGFX-imported project, testing a manually edited LED control: success

  • In the same TouchGFX project, every attempt to use the .ioc -> Generate Code flow in CubeIDE: failure

I considered enabling USB manually instead of using code generation, but that turned out to be more cumbersome than I expected. I ran into many build errors, and I realized that adding USB is much harder than simply toggling an LED.

Therefore, I would really like to know how to make the .ioc -> Generate Code flow work correctly in STM32CubeIDE for a TouchGFX-generated project.

If there is a solution that works in my environment, I would be very grateful to hear it.

Thank you.

Hello @Voidmain ,

Generally, I advise to avoid using STM32CubeIDE for editing the ioc when it comes to a TouchGFX project because there is often issue paths of generated files for the toolchain (it must not be under the root). Our recommended tool for code generation is STM32CubeMX. Then I use STM32CubeIDE for code editing.
https://support.touchgfx.com/docs/development/touchgfx-hal-development/generator-how-to/generating-code#generated-project

Osman SOYKURT
ST Software Developer | TouchGFX