cancel
Showing results for 
Search instead for 
Did you mean: 

How do I integrate what was created in TOUCH GFX DESIGNER into the IDE?

Emanuele78
Associate III

I developed firmware with CUBE IDE and then set up the 2.4" TFT LCD screen with buttons, etc., using TOUCH GFX DESIGNER. How do I import what I developed in TOUCH GFX into CUBE IDE?

1 ACCEPTED SOLUTION

Accepted Solutions
GaetanGodart
ST Employee

Hello @Emanuele78 ,

 

Once you have created you desired GUI, simply click on "Generate code" on the bottom right corner:

GaetanGodart_0-1729855272473.png

Then you can simply open the folder of your project on the bottom left:

GaetanGodart_1-1729855321130.png

Finally, open your STM32CubeIDE project in the STM32CubeIDE project.

 

Also, you can look at this video : How to TouchGFX: Creating my first GUI with TouchGFX Designer for STM32 GUI applications 

 

Hope this help! :smiling_face_with_smiling_eyes:
If this answers your question, I invite you to select this comment as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

15 REPLIES 15
GaetanGodart
ST Employee

Hello @Emanuele78 ,

 

Once you have created you desired GUI, simply click on "Generate code" on the bottom right corner:

GaetanGodart_0-1729855272473.png

Then you can simply open the folder of your project on the bottom left:

GaetanGodart_1-1729855321130.png

Finally, open your STM32CubeIDE project in the STM32CubeIDE project.

 

Also, you can look at this video : How to TouchGFX: Creating my first GUI with TouchGFX Designer for STM32 GUI applications 

 

Hope this help! :smiling_face_with_smiling_eyes:
If this answers your question, I invite you to select this comment as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
Emanuele78
Associate III

Thank you, I managed to import the file created in TouchGFX into the IDE. Now, for the next step, how do I integrate it into the IDE firmware I've already written? How should I proceed? Which folders do I need to copy from the TouchGFX file to the IDE? 

In the attached screenshot, you can see the two projects open. Thanks again.

To many files. folders and adding paths to deal with. You're better off copying your files from the other project into the TouchGFX project.

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

I did as instructed, but I’m getting errors. The IDE indicates that some definitions are not recognized within the main.c file. However, the definitions are present in main.h, and main.c includes main.h. What could be causing this error? Thank you.

It depends on where you placed your files in the TouchGFX project. Show your project tree and added files. 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

The two firmwares I would like to merge are 'Myoriject_PULSANTEeLED' and 'STM32F249I-DISCO' (the latter is the file created by TOUCHGFX for the IDE). I would like to insert the code from the first into the second. Which files/folders should I copy and paste? Thank you.

You only have ds18b20.c/h files from what i can see. Using Windows Explorer, go to the TouchGFX project then Core directory. Copy the ds18b20.c/h files to the src and inc folders.

Whatever you've done in main.c in your first project, you'll have to copy/paste to the TouchGFX, typically functions. If you wrote code in while loop, then you'll need to add that code to a new TouchGFX task because the while loop in TouchGFX is never reached, which you'll see a comment indicating that.

To show the new files in the project tree, I believe you may need to do a import of the ds18b20 files but be sure to only link them

 

 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

Setting aside the ds18b20.c/h files for now, I copied/pasted what I wrote in main.c from the first project into the main.c created by TouchGFX, including the while loop. I also copied main.h from the first project into the second one, is this correct?
The IDE is showing several errors, the most frequent being that the variables from the first project are considered undeclared or not correctly defined in main.c. However, they are actually defined in main.h, which I copied (from the first to the second). How can I fix this? Thanks again.

Karl Yamashita
Lead III

You drag and drop the main.h file onto the TouchGFX project tree?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.