cancel
Showing results for 
Search instead for 
Did you mean: 

Need an advice

GSerg.1
Associate II

Hi guys. I am new to STM32 MCUs and I need an advice on what couple of kits and compilers and IDEs is better for developing applications for STM32 MCUs that uses TouchGFX.

I thought that STM32CubeIDE is the most straight way to do this, and I tried to begin with STM32CubeIDE 1.3 + TouchGFX 4.1. But when I create my first project in STM32CubeIDE using videos from youtube, my project doesn't wants to build, throwing a lot of errors like "touchgfx::Font - unknown definition..", etc.

I made:

1) Created empty STM32 project in STM32CubeIDE, specifying C++ radiobutton.

2) Under "Additional software" i specified X-CUBE-TOUCHGFX... -> TouchGFX, checking then

a "Graphics" checkbox in .ioc file.

3) I made some settings at X-CUBE-TOUCHGFX.. panel in .ioc file (took on LTDC, Double

buffering, acceleration using DMA2D, etc.).

3) At TouchGFX folder in project tree i modified .part file using TouchGFX, creating primitive

screen with a touch button and generating code in touchGFX designer.

4) I've deleted a "Simulator" folder from TouchGFX folder in project tree.

5) Tried to build..

I did it with my STM32F429ZIT-DISCOVERY board.

Whats wrong and where can i get instructions/examples for TouchGFX for STM32F429 ? I want to build a simple voltmeter using built-in ADC and TouchGFX with my board for a while (for a start).

Thanks a lot.

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

You go to CubeMX (.ioc is not a CubeIDE file, it's a CubeMX file) and configure the ADC. Then you generate code. Do not forget to generate code also from TouchGFX Designer afterwards.

The ADC is among the different elements on the left of the screen in Analog tab.

0693W000001qKIDQA2.png

/Alexandre

View solution in original post

9 REPLIES 9
Alexandre RENOUX
Principal

Hi,

You should use the Application Template for STM32F429-DISCO available on TouchGFX Designer to start off.

/Alexandre

GSerg.1
Associate II

Thanks, Alexandre. I tried this template, and it works fine at my board when running via TouchGFX Designer only (button "target" near "generate code"). But how I can continue with that template in STM32CubeIDE ?

Alexandre RENOUX
Principal

Hi,

When you create your project with an Application Template from TouchGFX Designer, go to the project folder, you should find a STM32CubeIDE folder. Go inside and double click on the .project file.

/Alexandre

GSerg.1
Associate II

Thank you! Works fine. But how to create a .ioc STM32CubeIDE project file to configure MCU and add all ADC related code ?

Alexandre RENOUX
Principal

You go to CubeMX (.ioc is not a CubeIDE file, it's a CubeMX file) and configure the ADC. Then you generate code. Do not forget to generate code also from TouchGFX Designer afterwards.

The ADC is among the different elements on the left of the screen in Analog tab.

0693W000001qKIDQA2.png

/Alexandre

GSerg.1
Associate II

Uh oh. Is there no way to generate .ioc file and all needed file/folder structure and code in STM32CubeIDE ?

GSerg.1
Associate II

Hi. I used https://community.st.com/sfc/servlet.shepherd/document/download/0690X00000DYYPKQA5?operationContext=S1 tutorial and all works fine. But why when I update my design via .part file using TouchGFX designer and then build my project in STM32CubeIDE and then trying to debug it with my board - the gui design is not updated and I get my initial design ? Of course, I am always generating code in TouchGFX designer after all changes in my gui. When I opening my .part file again - all changes I made are saved.

Alexandre RENOUX
Principal

Hi,

Did you download the built binary file into your board ? If you only build and debug without downloading this won't update the program of your board.

.part file is only changed by CubeMX and read by TouchGFX Designer. Then TouchGFX Designer generates .touchgfx file with all your GUI information. You should not change .part yourself.

If this does not answer your question, please provide more information (steps performed, picture of your Project Manager tab in CubeMX, etc.)

/Alexandre

GSerg.1
Associate II

Thank you, Alexandre !

​I stopped those unsuccesful experiments and used to go way you provide.

I created touchgfx project, set up my GUI, generated code and close touchgfx designer.

Then i opened cubemx, set up my hardware, generated code. Then again open and re-generate code from touchgfx.

Then via cubeide opened .project file from folder /STM32CubeIDE and wrote my code. Save, build and click "debug". And my voltmeter now works fine. And my further modifications in GUI via touchgfx are well reflected at my board.

It is true, that i had to write some code in folders and files, which are not included in cubeide folder structure (the thing which delivered some misunderstanding and troubles for me as a novice), but that was made well with God's help and now all works fine.

Thank you again!

0693W000001qZdaQAE.jpg