Skip to main content
Aksl
Associate III
March 25, 2022
Solved

TouchGFX Designer : Error "Unable to locate C:/"

  • March 25, 2022
  • 8 replies
  • 10512 views

Hello,

I created a project in STM32CubeIDE, I initialized all peripherals to their default mode using CubeMX, and generated some TouchGFX code usingTouchGFX Generator. Then I opened the file ApplicationTemplate.touchgfx.part with TouchGFX Designer, drew some graphics and tried to generate the code, but I got an error, here are the logs :

"Generate Code

   Generate

       Wrote config/gcc/app.mk

       Done

   Generate Assets

       make -f simulator/gcc/Makefile assets -j8

       Reading ./application.config

       Done

   Post Generate

       touchgfx update_project --project-file=simulator/msvs/Application.vcxproj

       no

       Done

   Post Generate Target

       touchgfx update_project --project-file=../Essai_13.ioc --platform=m4

       Unable to locate C:/Users/bernard/Home/TouchGFX_Projects/Essai_13/TouchGFX

       Failed

   Failed"

Note that C:/Users/bernard/Home/TouchGFX_Projects/Essai_13/TouchGFX is the path to the folder where ApplicationTemplate.touchgfx.part resides.

What is wrong here ? What can I do to work on this project with TouchGFX Designer ?

Thanks in advance !

Best answer by Aksl

If I sum up, in ApplicationTemplate.touchgfx.part, you need to insert 2 lines :

BEFORE :

"Application": {
 "Name": "Essai_12",
...

AFTER :

"Application": {
 "Platform": "m4",
 "ProjectFile": "../Essai_12.ioc",
 "Name": "Essai_12",
...

And of course adapt to your platform and .ioc file name.

8 replies

MM..1
Chief III
March 25, 2022

I mean searched ../Essai_13.ioc isnt exist or on other place, try correct path manualy

Aksl
AkslAuthor
Associate III
March 28, 2022

The file Essai_13.ioc exists at C:/Users/bernard/Home/TouchGFX_Projects/Essai_13 (thus is C:/Users/bernard/Home/TouchGFX_Projects/Essai_13/TouchGFX/..).

I tried to correct the path manually but I don't find where, is it in a file or in TouchGFX Designer ?

HJung.6
Associate II
March 28, 2022

same problem.

how can i fix?

0693W00000LvvlRQAR.png0693W00000LvvlWQAR.png

HJung.6
Associate II
March 29, 2022

solve!

check "run as administrator" TouchGfx Designer"

"C:\TouchGFX\4.19.0\designer\TouchGFXDesigner-4.19.0.exe"

Aksl
AkslAuthor
Associate III
March 29, 2022

This doesn't solve it for me. I tried moving my project around on different disks, but I still see the same error.

Martin KJELDSEN
Principal III
April 1, 2022

Hi,

The Designer doesn't understand .part files that are old, only .touchgfx files. So if you're using an old project that was never opened with that version of the designer, then there's a problem.

You can get around it by adding Platform and ProjectFile to your .part file. For instance, for

 "Platform": "m7",
 "ProjectFile": "../STM32F746.ioc",

Aksl
AkslAuthor
Associate III
April 4, 2022

Hello,

Thanks for your answer ! I'm not sure what you mean by "old", this project was created by the latest version of TouchGFX Generator, and I'm using Designer 4.19.0 to generate its code.

At first there is only a "ApplicationTemplate.touchgfx.part" file, in which I added the lines as you advice (m4 for Platform and ../Essai_13.ioc for ProjectFile), then I opened it with Designer, added a box and a text, genererated the code, but got the same error at the "Post Generate Target" step.

But Designer had created an "Essai_13.touchgfx" file, so I added those lines in it too, opened it and tried again but I got the same result.

I attach the modified files and a tree-like file listing of the project (after code generation) just in case.

Can you spot any obvious mistake ?

Thanks in advance ! Have a nice day

Martin KJELDSEN
Principal III
April 4, 2022

Hi,

I shouldve mentioned that you need to put those lines in the "Application" node of the .part file.

 "Application": {
 ...
 
}

Aksl
AkslAuthorBest answer
Associate III
April 4, 2022

If I sum up, in ApplicationTemplate.touchgfx.part, you need to insert 2 lines :

BEFORE :

"Application": {
 "Name": "Essai_12",
...

AFTER :

"Application": {
 "Platform": "m4",
 "ProjectFile": "../Essai_12.ioc",
 "Name": "Essai_12",
...

And of course adapt to your platform and .ioc file name.

Martin KJELDSEN
Principal III
April 4, 2022

Great.

We're just releasing 4.19.1 now, and we just made a fix to compensate for this scenario, which could happen, where the designer was not robust in updating projects when the .part file was used as the project reference during an update of an application (e.g. 4.18.1 to 4.19.1).

Thanks!

Richard Lowe
Senior II
November 30, 2022

0693W00000WJtGeQAL.pngI have the same issue on a dual core M7/M4. It is not finding the .cproject file in the root. Which isn't there. The .cproject file exists in the M7 directory along with the ToughGFX folder.

I copied the .cproject file from the M7 directory to the root and that seems to solve the problem in TouchGFX designer, but the paths are complete messed up when you compile them in CubeIDE.

TouchGFX Version: 4.20

HAL CubeH7 Version: 1.11

MCU: STM32H757

ApplicationTemplate.touchgfx.part file:

{
 "Application": {
 "Name": "NLMonitor",
 "TouchGfxPath": "../Middlewares/ST/touchgfx",
 "AvailableColorDepths": [ 24 ],
 "AvailableLCDs":
 {
 "24": "LCD24bpp"
 },
 "AvailableResolutions": [
 {
 "Width": 800,
 "Height": 480
 }
 ],
 "PostGenerateTargetCommand": "touchgfx update_project",
 "Family": "STM32H7",
 "SubFamily": "STM32H747/757",
 "Platform": "m7",
 "ProjectFile": "../../NLMonitor.ioc",
 "OptionalComponentsRoot": "../Middlewares/ST/touchgfx_components",
 "OptionalComponents": [
 ]
 },
 "Version": "4.20.0"
}

TouchGFX Generate Code Output:

Post Generate Target
 touchgfx update_project
 Unable to locate <file directory here>/Monitor/.cproject
 Failed
 Failed

 Compiler output:

Romain DIELEMAN
ST Employee
December 6, 2022

Hi,

Dual core projects are always a bit more complex :grinning_face_with_sweat: Did you start a project from STM32CubeMX or did you use a TouchGFX Board Setup for the STM32H747 dk board and modified it ? If the first (which is the best process) I would still suggest to create a project with the STM32H747dk example to compare the files and settings.

/Romain

Richard Lowe
Senior II
December 8, 2022

I tried all. The project generation from STM32CubeMX in my preference, but it doesn't work. I've generated a working project from TouchGFX but I DO NOT like the virtual folders and files that it uses in STM32CubeIDE.

I will generate both but I'm not really interested in modifying a file each time I re-generate the project. Would love to see it fixed.

AS.19
Associate
January 4, 2023

MORE:

Tried all suggestions above, but doesn't seem working.

Visitor II
April 25, 2025

 

 

This dual core problem has cropped up again - has anyone had success here? 

"Post Generate Target
touchgfx update_project
Unable to locate C:/BAX/STM32H747I-DISCO/.cproject
Failed
Failed"

 

@Richard Lowe I think I read that wrong? Did you have that ../CM7->../ replacement thing backward?

Whats the root from touchGFX POV?