cancel
Showing results for 
Search instead for 
Did you mean: 

Using Tgfx.exe generate job fails

Elaskon
Associate II

Hi @ all,

I'm using the TouchGFX version 4.20.0 for a development project for a user interface and communication system called "UICS".

To generate a build job on a jenkins I tried to used the command "tgfx.exe generate" to automatically generate files. For example: (file path abbreviated)
..\tgfx.exe generate -v -p ..\UICS_Software.touchgfx

I can track that the makefile is called and the generation of files should start but at some point a folder is renamed which is necessary for the file generation.

This is the output:

Generate Code

Wrote generated/simulator/gcc/Makefile

Done

Generate Assets

make -f simulator/gcc/Makefile assets -j10

generated/simulator/gcc/Makefile:221: recipe for target 'images' failed

process_begin: CreateProcess(NULL, ../Middlewares/ST/TouchGFX/touchgfx/framework/tools/imageconvert/build/win/imageconvert.out -r assets/images -w generated/images, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [images] Error 2

simulator/gcc/Makefile:47: recipe for target 'assets' failed

make: *** [assets] Error 2

Failed

Generating assets failed

Inside the project files the folder "UICS_Software\Middlewares\ST\TouchGFX\touchgfx" is renamed to "UICS_Software\Middlewares\ST\TouchGFX\touchgfx_backup" during execution of the comand "tgfx.exe generate". Due to renaming of the folder, the makefile cannot find the file "../Middlewares/ST/TouchGFX/touchgfx/framework/tools/imageconvert/build/win/imageconvert.out".

Can you help me solving this problem, so that I can get jenkins to generate files automatically?

Looking forward to hearing from you and thanks for your help.

 

9 REPLIES 9
JSeiz.1
Associate II

Hi,
I have installed TouchGFX 4.22 and I have the same problem.
When I move a copy of the "touchgfx" folder into the directory ".....\Middlewares\ST\TouchGFX" at the moment when the directory is renamed to "touchgfx_backup", my project is completely built.

 

Elaskon
Associate II

Hi again,

can someone please help me with this issue. I am still struggling to get it to work.

Thanks in advance.

Dev80
Associate

Same here...

Hello @Elaskon ,

The 'touchgfx_backup' is created when you have created your project in an older version of TouchGFX and then you open it in a newer version. So, I would say make sure the TouchGFX version of your project and the TouchGFX version of your designer are the same. In addition, you can try to use another solution, which is to use the TouchGFX Environment to generate code and compile.

I hope this will help you, otherwise, feel free to ask more questions.

Mohammad MORADI
ST Software Developer | TouchGFX

Thanks for your answer.
Can you explain how I make sure the TouchGFX version of the project and the TouchGFX version of the designer are the same?
By "using the TouchGFX environment" you mean that on the Jenkins the designer would have to be opened? Or is there another way to use the TouchGFX environment?

 

Hello @Mohammad MORADI ESFAHANIASL,

As you wrote:


@Mohammad MORADI ESFAHANIASL wrote:

Hello @Elaskon ,

The 'touchgfx_backup' is created when you have created your project in an older version of TouchGFX and then you open it in a newer version.

...



I created a complete new tiny test project with only one button in it by using TouchGFX Designer 4.20.0, to test if the 'touchgfx' folder is not renamed during code generation.
I used the following command:
C:\TouchGFX\4.20.0\designer\tgfx.exe generate -v -p C:\Project\UICS_Test\TouchGFX\UICS_Test.touchgfx

But even with this very simple project, the folder 'touchgfx' was renamed to 'touchgfx_backup'. Although I used the same TouchGFX version to create the project and generate the files.

Hello @Elaskon,

Sorry for the late response. We are tried to replicate this issue, but we couldn't get the same issue. However, we found a bug close to this issue while generating through command-line. Hopefully, fixing that issue will help this case as well. 
TouchGFX Environment is a CLI tool to help you generate and flash without opening the designer, and it's installed when you install TouchGFX. You can find it under this directory:
C:/TouchGFX/4.20.0/env/MinGW/msys/1.0/msys.bat

Mohammad MORADI
ST Software Developer | TouchGFX
Ktaro
Associate

Hello Elaskon,

I'm Japanese, so my English is poor, but please understand.

Are there any hidden folders under ./assets/images that you checked out with Jenkins?

The build will fail if there are unrelated files under ./assets/images.

If the version control software you are using is SVN, try setting it to the latest version in Jenkins system settings. No hidden folders will be created under ./assets/images.

Could you please check it once?

Hi Ktaro,

thanks for your reply.

 

I have checked the folder ./assets/images. There are no hidden folders or unrelated files in ./assets/images.

The version control software we are using is TortoiseHg Version 5.0.2.

 

But it's not dependent on the jenkins. It also fails locally if you are try to generate the source files with
..\tgfx.exe generate -v -p <your_project>.touchgfx

 

It is easy to reproduce. Just open a new project in TouchGfx and create a single screen with a button and save it. Open a command line tool and use the above written command for generating files. "tgfx.exe" can be found inside your TouchGfx installation directory on your computer. Please contact me, if you need help to reproduce the behaviour.