2020-11-01 07:42 PM
Used ecosystem :
STM32CubeIDE version: 1.4.2 Build: 7643_20200813_1322 (UTC)
TouchGFX vesion 4.5.0 , with STM32F746G-DISCO template version 3.0.2
STM32Cube FW_F7_V1.16.0 Drivers
To repeat the issue :
1) Create a new project using TouchGFX Editor, using STM32F746G-DISCO as template.
2) Add some widgets to the default initial screen (eg. some red text)
3) Save and generate code from TouchGFX Editor.
4) Open the ".project" file from the system's file exporer, letting STM32CubeIDE import it to the current workspace.
5) Compile from STM32CubeIDE : success ! And it runs !
6) Enable a new IP from the CubeMX .oic file (e.g, the USB_OTG_HS as Host Only )
7) Save the .ioc file and let STM32CubeMX re-generate the code.
8) Big HOT MESS in the project directory, the Debug output directory gets added as compilable, two main.c files appear in two separate Core folders, compilation won't succed anymore.
:weary_face: :fearful_face: :loudly_crying_face:
Solved! Go to Solution.
2020-11-02 11:23 PM
TouchGFX is currently creating projects with a name that is derived from the name of the selected board. This leads to problems when you try to open two projects that have the same board as basis because the project name (internal) is the same, even the name of the project folder is different.
To avoid this, you can rename the entire project so that the new project name is reflected throughout the structure. This function is not implemented yet in TouchGFX, but you can do it manually:
You could write a script for it (e.g. using PowerShell under Windows), but maybe this will be fixed in one of the next versions of TouchGFX.
When your question is answered, please close this topic by choosing Select as Best.
/Peter
2020-11-02 12:48 AM
Hi, @arnaljl
I have exactly the same software versions and followed your steps exactly - everything went well and looks fine, no errors, project structure as expected.
Maybe you could save the file .project before and after doing step 6 and compare it afterwards?
Regards
/Peter
2020-11-02 11:01 AM
I tried the procedure again, but on another machine, and you're absolutely right, @Peter BENSCH . It works without trouble.
So I traced back the steps on the very computer that showed this behavior, and the culprit is the Eclipse project naming.
All projects (not project folders, but projects names) issued from TouchGFX, when using the same template, appear in STM32CubeIDE with the name of this very template.
Here's the example :
So I wager a project renaming from Eclipse (namely STM32CubeIde) was done around step 6) or step 7), which led to this re-generation garbage : the project name mentioned inside the .ioc file wasn't matching, I guess ?
Still, this TouchGFX project naming is a bit of a issue: what's the point of asking for the Application Name in TouchGFX's wizard is it's only reflected on the .touchgfx filename, and not the final C++ project generated by TouchGFX Designer ?
2020-11-02 11:23 PM
TouchGFX is currently creating projects with a name that is derived from the name of the selected board. This leads to problems when you try to open two projects that have the same board as basis because the project name (internal) is the same, even the name of the project folder is different.
To avoid this, you can rename the entire project so that the new project name is reflected throughout the structure. This function is not implemented yet in TouchGFX, but you can do it manually:
You could write a script for it (e.g. using PowerShell under Windows), but maybe this will be fixed in one of the next versions of TouchGFX.
When your question is answered, please close this topic by choosing Select as Best.
/Peter
2024-01-19 03:35 AM
Well I did everything as noted and it worked but then when getting back to TouchGFX designer
it can't generate code or run simulator, giving this:
Post Generate Target
touchgfx update_project
Unable to locate C:/TouchGFXProjects/ADXL355/STM32F746G_DISCO.ioc
Failed
Failed
so I can't go back kand forth between TouchGFX designer and cubeIDE