cancel
Showing results for 
Search instead for 
Did you mean: 

How to definitely integrate a TouchGFX application to STM32CubeIDE ?

Woula
Associate II

Hi,

I'm trying to create a simple TouchGFX Application, that can handle hardware components, such as GPIO. Many tutorials exist but i haven't seen yet an official walkthrough from ST. Maybe, i haven't searched enough. So , is there any tutorial or documentation that explain the right procedure, even the setup for custom hardware design.

Further informations :

I have an STM32F429I-DISCO. I use STM32CubeIDE 1.1.0 and TouchGFX 4.13.0

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

We don't do recommendations for hardware design. TouchGFX Generator from CubeMX can generate a CubeIDE project for you. And CubeIDE projects exist for all the Application templates available from the designer, even the 429I-DISCO. This will have the setup and integration you require to develop TouchGFX applications for that board.

Please check the documentation on support.touchgfx.com.

/Martin

View solution in original post

16 REPLIES 16
Martin KJELDSEN
Chief III

We don't do recommendations for hardware design. TouchGFX Generator from CubeMX can generate a CubeIDE project for you. And CubeIDE projects exist for all the Application templates available from the designer, even the 429I-DISCO. This will have the setup and integration you require to develop TouchGFX applications for that board.

Please check the documentation on support.touchgfx.com.

/Martin

Fabrizio1
Associate II

Hi Woula

I'm having the same problem, I think the best way to integrate is to create a project from TouchGFX and then in CubeIDE "File->Open Projects from File System" and select the folder "STM32CubeIDE" inside the TouchGFX's project. I don't know if this is the right way, but I think is the easiest.

I was able to call virtual functions trigered by touch buttons to change the alpha, size, color, etc of elements on the screen, but i can't toggle the LED on the board by pressing a touch button or call a virtual function trigered by the fisical button.

Why are you using STM32CubeIDE 1.1.0?

I'm using an STM32F429I-DISC1, STM32CubeIDE 1.3.0 (I think is the latest version) and TouchGFX 4.13.0

If you find any information that can help with the GPIO interaction please share.

Fabrizio

chaaalyy
Senior II

Hi 🙂

This video is for the F746 discovery, but basically it shows, how to get the stuff up and running quickly. Of course, you have to change to a) actual software versions and b) your board 😉

https://www.youtube.com/watch?v=eiPtQp4chG0

/Charly

scottSD
Senior III

@Martin KJELDSEN​ 

There is something strange when creating a project in TouchGFX Designer and then doing a "File->Open Projects from File System" in Stm32CubeIDE.

The Core directory and the TouchGFX directory are NOT included in the Project Explorer of Stm32CubeIDE:

0693W000000WbkpQAC.png

Why is this?

Does this mean one must edit the Core files and the TouchGFX externally and not in this project?

I also notice that trying to Right Click > Go to Declaration on a variable does not take you to the declaration if that file is not part of the project.

What is the proper way to create/import/open a project in Stm32CubeIDE that was created in TouchGFX Designer?

Hi Scott,

You can find some of the core files in Application->User in CubeIDE, there are the files generated by TouchGFX as well and you can edit the files from here. I think these are shorcuts to the actual files.

Which variable are you trying to access?

I didn't find the proper way to do it yet, but I think this way is working for me.

There is a webinar about Hardware integration, but it's really complicated to follow. I'm still struggling to get an interaction triggered by an external button.

Link to the webinar: https://youtu.be/jQO7zhX0e0Q

Fabrizio

By "TouchGFX" do you mean the generated code and user code from the designer? This is under "Application/User/TouchGFX", and the "Core" files are under "Application/User". I agree that this can be confusing if one is trying to map to the filestructure directly.

Let me know what you're having issues with and i'll help.

Hi Martin,

My final goal is to create an application whith multiple screens. Some screens whith a slider, more than one button in each screen and controlled only by a rotary encoder and a push button to replace the touch input. Eventualy I will have to read from an ADC input to show the value on the display and use some digital outputs. And finally, if everything works, I would like to make a custom board whith a bigger screen.

So far I was able to use a slider (using the touchscreen) that triggers a virtual function to change the value of a progress indicator, then I used a button (also touchscreen) to toggle an LED whith a virtual function.

Now I'm trying to use a push button to do something on the display (like change screen or change the color of an element), but I still couldn't do it.

I think I understand the basic flow between the view, the presenter, the model and the backend, but I find it confussing whith all the files. Also, I don´t have much experience with RTOS (I think this is a big disadvantage, but I'm reading about this topic). I allways worked with 8 bit MCU and bare metal programming.

I watched the hardware integration webinar at least 2 times, but I found it hard to follow mainly because the code is already written and there are some variables or functions that I don'n know were are declared. I will watch it again and I will keep reading about FREERTOS.

Sorry about the lack of a specific question, but I'm quite confused yet. Any sugestion or opinion will be appreciated.

Thank you.

Hi Fabrizio,

Thanks for the contribution, yes it is an easy way for sure. Now i don' t really know if i can do the same with a board with a different MCU.

I haven' t updated my IDE yet.

Yes, if i have a solution about the GPIO interaction i will share it.

Regards