STEmWin with Touch Screen on STM32F746G Dicovery – Bonus -Part 6

In this part of tutorial we will use touch in STEmWin using GUIBuilder to design our user interface.

For quite some time since last part of tutorial it has been bugging me how to use nice shiny buttons from STEmWin and touch support for them. Well I must say it finally worked and below is my process of making it work.

I used GUIBuilder to desing simple layout with two buttons and a label:

Here is link to FramewinDLG.c so that you can have the same file as I do.

I made additional folder inside our project to host GUIBuilder.exe and our design file:

In here we need to put GUIBuilder.exe from CubeMX Repository and our FramewinDLG.c. And don’t forget to include this folder in our project:


We need to include this file (FramewinDLG.c) in main.c so that we can display our “beautiful” design:

We also need to add variable for touch screen so that our program can communicate with STEmWin:

We need some function which will update touch data and send it to STEmWin:

For touch data inside our program we define another variable:

Somewhere inside initialization of our hardware we also need to initialize our green LED:

At the end of main function we need to add functions for updating touch data and our screen:

And finally we add code at the end of main.c:

It looks simple now, but it took me quite a few hours to finnaly get it to work.

Enjoy until next time!



P.S.: If you found this helpful, I would appreciate clicking on Ad on the right side to give me a little “motivation”. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *