cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX compile problems

sk-st
Associate III

Hello, i am unable to compile a touchgfx project.

Try #1:

Starting from CubeMX, Version 6.10.0 i click on Generate Code. It ends with "The Code is successfully generated under:".  When i click on Src/ApplicationTemplate.touchgfx.part, it opens TouchGFX Designer Version 4.23.1.

I start with a "Blank UI" and klick on Import.Then i define there a Box and a Button.

Then i click on "Generate Code" it fails with: Generate Code | Failed.

Unsupported toolchain: Makefile

 

Here the CubeMX is running on a linux box while TouchGFX Designer is running on a Windows 10 computer.

 

Try #2:

I import the .ioc file from CubeMX into STM32 CubeIDE version 1.14.0 with "Import an Existing STM32CubeMX Configuration File (.ioc). I choose target language C++. During import code is generated. The structure looks different compared to generated code in Try #1. When i click TouchGFX/ApplicationTemplate.touchgfx.part it opens TouchGFX Designer.

I start with a "Blank UI" and click on Import.Then i define there a Box and a Button.

Then i click on "Generate Code" it succeeds with "Generate Code | Done".

Back in CubeIDE i click on "Build Project" and it succeeds.

Does someone know how to generate a Makefile for CLI compilation?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

 

yes, in the meantime i found a solution.

I created a project with designer with the F429-DISCO board.

There was a wonderful makefile. It compiled successfully.

Then i used this makefile with my custom board, code generaded by CubeMX from IOC-File.

Unfortunately the file hierarchy strcucture is totally different so the makefile from Designer

did not work here. So i had to adjust the folders and it workd.

 

View solution in original post

20 REPLIES 20
GaetanGodart
ST Employee

Hello @sk-st ,

 

From your previous posts I guess you are using a custom board for your project.
Have you had the opportunity to look at the board bring up guide : board bring up guide ?

 

From the png I can read "unsuppoprted toolchain : makefile".
It looks like you select the makefile toolchain in STM32CubeMX when generating code such as below :

GaetanGodart_0-1708964838963.png

If you want to flash your board from Designer, you have to select STM32CubeIDE.

 

Regards,

 

Gaetan Godart
Software engineer at ST (TouchGFX)
sk-st
Associate III

No, i do not want to flash the board from designer.

I want the following workflow:

1. Defining the board in CubeMX (linux computer)

2. Code generation with CubeMX (linux computer)

3. UI development with Designer (windows computer)

4. UI code generation with Designer (windows computer)

5. Compile and flash with gnu toolchain (linux computer)

 

Although X-CUBE-TOUCHGFX is selected in CubeMX in Middleware,

the Makefile generated with CubeMX Code generation (2) does only

contain one file regarding touchgfx:

Src/app_touchgfx.c

In the beginning of this file is:

This file was created by TouchGFX Generator 4.23.0.

 

The file does not contain real code, only prototypes and definitions.

Makefile renamed to Makefile.txt due to forum software restrictions.

 

GaetanGodart
ST Employee

Hello @sk-st ,

 

It seems you were able to go up to the building step using the second method. All you are left to do is to flash then.

 

You can maybe run the TouchGFX environment in Linux by using something like WineHQ.
Open TouchGFX environment, from there you can generate code, compile and flash.
In the environment command line, use tgfx.exe generate -p path to generator code
For compiling and flashing follow this : tuto compiling and flashing 

 

As per "Does someone know how to generate a Makefile for CLI compilation?" I don't think we support that because as you probably know, TouchGFX doesn't support Linux.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
sk-st
Associate III

Thank you for yor quick reply.

 

Should CubeMX be able to generate a working code without CubeIDE which then can be further processed with Designer?

Or is this a half functional remaining from ancient times?


The goal is, that a graphics designer can design the GUI with Designer on a windows computer, while the development works on a linux server with gnu toolchain and RCS.

 

In the meantime i found out, that as soon as a build is started within CubeIDE, it generates a makefile under Debug/ directory.

GaetanGodart
ST Employee

If what you want to do is to have 2 people work on a single project, then the solution is to import the GUI made on Designer by sharing the myproject.touchgfx as well as the folder gui and assets.

From there the people compiling on Linux can replace their touchgfx file and those 2 folders with the ones made by the graphic designer containing the actual GUI.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
sk-st
Associate III

Hello Gaetan,

thank you for your answer.

This sounds really target-aimed.

 

Now the remaining final question is, should the code generation work with CubeMX as it includes TouchGFX Generator and i am doing something wrong. Or does gode generation only work with CubeIDE?

GaetanGodart
ST Employee

Hello @sk-st ,

 

What do you mean by "target aimed" ?

 

When generating code from STM32CubeMX, if you enabled TouchGFX, you should get more than one file regarding TouchGFX. Therefore, I think there is something wrong in your board bring up since you use a custom board from what I understood.

Furthermore, when generating code from STM32CubeMX, you should get a file named MyProjectName.touchgfx, this is the file you are supposed to use for your design and when opening it you do not have to click on import like you do when opening the template file. That is why I share to documentation about board bring up in my first comment.

Board bring up are not my strongest skill but I can try to help you if you get stuck and think you did everything right, if I struggle to help you I will ask a colleague.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
sk-st
Associate III

Target-aimed means for me progress.

 

Can you test my .ioc file if it generates more than one file regarding TouchGFX? Thank you!

 

Regards,

Steffen

GaetanGodart
ST Employee

Hello @sk-st ,

 

Here are all the files mentioning TouchGFX in their name after generating with your set up :

GaetanGodart_0-1709630452649.png

After opening the template file, it goes up to this (touchgfx project created):

GaetanGodart_1-1709630521849.png

 

Have you had a loot at the TBS generated when creating a new F429 project from Designer, that could inspire you for your own TBS, maybe you can see some similarities and some differences :

GaetanGodart_2-1709630674868.png

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)