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?

 

20 REPLIES 20
sk-st
Associate III

Hello Gaetan,

 

thank you for your effort.

Meanwhile i have installed CubeMX on the win 10 PC, as well.

When i click on the lcd_controller_F429.ioc file, it opens CubeMX, then i

press the generate code button and get the following files:

files1.png

Under Src is:

files2.png

After opening TouchGFX by clicking on ApplicationTemplate.touchgfx.part,

i add some screens and buttons. The generate code fails again with

Unsupported toolchain: Makefile

As described in the first post.

But there are files created:

file3.png

The lcd_controller_F429.touchgfx you mentioned is also created.

On the windows PC is only STM32CubeMX and TouchGFX Designer installed,

no Toolchain. You generated the code with CubeMX? The file structure looks

a bit different.

My versions:

CubeMX: 6.10.0

TouchGFX: 4.23.1

GaetanGodart
ST Employee

Hello @sk-st ,

 

I have the same versions as you do.

You generated from both windows and Linux and got about the same result. I also got about the same result on my PC.

I have created a project from Designer by specifying the board I want to use as STM32F429 and I got a working project.

 

I must re-iterate, I think your board bring up is the problem here.
You could get inspired (to create your board bring up) by our TBS, the one you get when creating a project from Designer using a specific board such as below: 

GaetanGodart_0-1709732400063.png

Simply open Designer, click on "Create" or on "Create new", enter the beginning of the name of your MCU, select your MCU then click on create on the bottom right corner.
From there you will have all the files generated for the specific MCU used on the discovery board (same as you) and for the specific screen used on the discovery board (different than yours).
You can open the ioc file generated and compare it to your ioc file.
Fix the differences and modify it to fit to your screen specifications.

I hope you see the value in this method as it is hard for me to help you on a custom board that I know very little about and that I cannot debug as I don't have it in hand.

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

Hello Gaetan,

 

i think in your post from 2024-03-05 01:24 AM you generated successful code with Designer?

Meanwhile i did some tries:

When i choose EWARM Toolchain in CubeMX, Designer can generate code successful:

tc_ewarm.png

It works with STM32CubeIDE Toolchain as well:

tc_cubeide.png

But it does not work with Makefile as Toolchain selected in CubeIDE:

tc_makefile.png

 

Do you really think my project board bringup is the problem? I did not write any code so far, it is just what CubeMX generated, with no changes. Your suggested way of selecting an existing project worked, i think it chooses somethink else but not Makefile as Toolchain internally.

Hello @sk-st ,

 

Sorry for the confusion, in my response from march 5h, I was able to generate code from STM32CubeMX and get the same result as you.

 

Earlier you said :
"

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)
"

You could try to generate code un STM32CubeMX with the STM32CubeIDE toolchain which uses GCC, then generating Designer code which should work and then try to flash using GNU GCC in Linux.

It makes sense to me that the toolchain from STM32CubeMX can't be Makefile because Designer generate different code based on the selected toolchain. The Makefile option in STM32CubeMX is used for people who want to flash "from scratch" without using an IDE.

 

Regards,

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

Hello Gaetan,

 

so the conclusion is that CubeMX supports Makefile while TouchGFX Designer does not support Makefile.

So i try to get something to work which can't work.

Designer need to know the compiler to generate code.
To do so we use a Makefile ourself.
You could maybe change the compiler choice from within this Makefile.

This article could give you more information : https://support.touchgfx.com/docs/introduction/prerequisites 

Furthermore, it seems possible as Martin says " I know of people who dual-boot linux and windows to work with TouchGFX." in this post : https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/can-we-run-touchgfx-on-linux-wine/td-p/304129 

 

Regards,

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

The goal is, that the Code Developers can work on a linux computer and do the compiling there while the Graphics Designer can work with TouchGFX Designer on a windows computer. So no need to get the TouchGFX Designer to run on linux computer.

 

So now the workflow is:

1. Configuring the SoC with CubeMX (IOC-File) and STM32CubeIDE as Toolchain / Linux

2. Generating Code with CubeMX / Linux

3. Graphical Design with TouchGFX Designer starting with  ApplicationTemplate.touchgfx.part / Windows

4. Further Graphical Design with TouchGFX Designer with project.touchgfx file / Windows

5. Generate Code with TouchGFX Designer / Windows

6. Program and Run Target with TouchGFX Designer / Windows

 

#6 This Option is disabled because under Config -> Build in TouchGFX Designer the Compile Target Command is empty line so this is probably the reason why compiling is not possible under designer.

So usually the command in this Line is something like "make -f ../gcc/Makefile".

But the only Makefiles in the while file tree are:

./Src/simulator/gcc/Makefile
./Src/generated/simulator/gcc/Makefile

So this is only for simulator, not for real target.

Should Designer create this Makefile for target compiling?

 

 

 

Hello @sk-st ,

 

If you changed the workflow to now allow flashing using Windows, could you also generate STM32CubeMX code under Windows or are you bounded to Linux for the SoC configuration?

I am not familiar with STM32CubeMX's performance under Linux, maybe it would be interesting to try to generate STM32CubeMX under Windows and see if there is a difference.

I will get in touch with the STM32CubeMX team to investigate.

Also, when selecting the STM32CubeIDE toolchain, make sure to unselect "generate under root". We do not want this option to be selected.

 

Have you had the chance to compare your configuration with the one generated when creating a project directly from Designer?

 

You are right, if the "Compile Target Command" is not specified, you won't be able to compile (hence the bottom right button greyed out).
Here are the commands from one of my projects :

GaetanGodart_0-1710412229816.png


You will have to create a Makefile. You can take inspiration from the one generated when creating a STM32F429 project directly from Designer.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
GaetanGodart
ST Employee

Hello @sk-st ,

 

Were you able to move forward on your project?

Did you find a solution that meets your requirements?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

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.