cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX 4.20.0 working with CubeIDE 1.10.1, how do I open and work with the TouchGFX project in CubeIDE?

SWood.4
Associate III

I'm using a STM32F429I-DISC1 board. I can create a display in TouchGFX and it creates the project in the default location "C:\TouchGFXProjects\Display". It makes an IOC file in the "Display" folder "STM32F429I_DISCO_REV_E01.IOC" It makes a "STM32CubeIDE" folder with a " dot project" file (no IOC file for the CubeIDE project).

When I try to open the "IOC" file I get an error "Invalid Input: Must be IFileEditorInput".

When I open the "dot project" file in the STM32CubeIDE folder, CubeIDE imports the project and I can load/debug the board. But I don't have the "IOC" file that matches the project to edit and configure the MCU.

If I import the "C:\TouchGFXProjects\Display" with the "IOC", CubeIDE seems to make a new copy of the project, and editing the imported "IOC" file doesn't update the correct project files.

I can copy the "IOC" file into the "CubeIDE" project, and rename the "IOC" so it matches the project name. Changing the copied "IOC" doesn't update the files in the Cube project, it seems to be linked to the TouchGFX files.

Reading and watching the Demo's from ST, it seems like the workflow is:

  1. create the TouchGFX project and display, generate the code.
  2. open the IOC file generated by TouchGFX, enable analogs/timers etc. save it.
  3. open the cube IDE "dot project" and write the "USER" code to go along with the changes made in the IOC.

The code generated by the IOC don't update the cubeIDE project that TouchGFX creates.

Is there thread that covers the "correct" way to get the TouchGFX IOC file to update the CubeIDE project that I'm missing? Or the the correct work flow to keep the project files in synch? It seems like the biggest issue is not being able to open the IOC file in CubeIDE, but maybe that's by design? The "getting started" info I've found so far suggest the 3 steps above are what I should be doing. Some instructions jump from TouchGFX to CubeIDE and don't cover which files are opened in CubeIDE (ie, the main.c in the TouchGFX folder or main.c in the CubeIDE folder)

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Karl Yamashita
Lead II

The problem is the ioc file name doesn't match the project name.

  1. Be sure the project is deleted from CubeIDE but not from the file system.
  2. Rename the ioc file STM32F429I_DISCO_REV_E01 to STM32F429I-DISCO.ioc. There needs to be a dash, not underscore.
  3. Open the ioc file in a text editor and rename two text lines with STM32F429I_DISCO_REV_E01 to STM32F429I-DISCO. Save file.
  4. Re-Import the project.
  5. From Windows explorer drag the ioc file into the project in CubeIDE and Link to it. You should now be able to double click it to open the ioc file.
  6. You can also drag the touchgfx project in CubeIDE and Link to it so you can open the the TouchGFX gui from there as well.

You can see this video below which shows you how to rename the project to a usable name. TouchGFX generates code with just the dev board name, even though you gave a useful name in the TouchGFX GUI. I wish ST would fix this.

Be sure to read the description as I do mention that I forgot to rename the text inside of the ioc file. I'll have to redo the video in the future

https://youtu.be/AizWAlbU4Og

I Can't Believe It's Not Butter. If you find my answers useful, click the accept button so that way others can see the solution.

View solution in original post

3 REPLIES 3
Karl Yamashita
Lead II

The problem is the ioc file name doesn't match the project name.

  1. Be sure the project is deleted from CubeIDE but not from the file system.
  2. Rename the ioc file STM32F429I_DISCO_REV_E01 to STM32F429I-DISCO.ioc. There needs to be a dash, not underscore.
  3. Open the ioc file in a text editor and rename two text lines with STM32F429I_DISCO_REV_E01 to STM32F429I-DISCO. Save file.
  4. Re-Import the project.
  5. From Windows explorer drag the ioc file into the project in CubeIDE and Link to it. You should now be able to double click it to open the ioc file.
  6. You can also drag the touchgfx project in CubeIDE and Link to it so you can open the the TouchGFX gui from there as well.

You can see this video below which shows you how to rename the project to a usable name. TouchGFX generates code with just the dev board name, even though you gave a useful name in the TouchGFX GUI. I wish ST would fix this.

Be sure to read the description as I do mention that I forgot to rename the text inside of the ioc file. I'll have to redo the video in the future

https://youtu.be/AizWAlbU4Og

I Can't Believe It's Not Butter. If you find my answers useful, click the accept button so that way others can see the solution.

Thanks for the quick answer. I made a new touchGFX project and followed your instructions. With that project I can make changes to the display, have a working Cube IDE project with an IOC file. It's looking like I'm back on track.

I'm not sure how you figured out how to make that work and what files to rename, I imagine it took a bit of time so thanks for sharing your knowledge.

I'm surprised that ST hasn't fixed this issue, or made an import or export tool to name the files correctly.

I was sure I was doing something wrong or overlooking a import tool that would synch the touchGFX with CubeIDE. It's like they built a luxury automobile but didn't include a way to start the engine, leaving the owners to figure out how to wire in an ignition switch so they can use it.

You're welcome!

Well I kind of knew your issue as I ran into that problem years ago. When you import the project it shows the dev board name and not the project name you used for TouchGFX. If you had a couple of projects using the same dev board, you could not have more than one project imported even if one was closed. The projects imported have to be a different name.

So I spent a considerable amount of time trying to figure out how to rename the projects to a unique name so i could have two or more projects imported in CubeIDE. So i've seen that error before and learned what files needed to be renamed or what text within the files needed to be renamed.

I am surprised that ST hasn't tested the code that is generated for that Rev_E01 board? That's a terrible oversight.

I Can't Believe It's Not Butter. If you find my answers useful, click the accept button so that way others can see the solution.