Skip to main content
Associate
August 13, 2024
Solved

Cannot use TouchGFX with STM32CubeIDE (undefined references)

  • August 13, 2024
  • 3 replies
  • 2836 views

I am new to the touchGFX ecosystem and I am trying to setup a touchGFX project to work with the STM32CubeIDE. I have looked at various other forum posts, youtube videos, and the touchGFX board bring up documentation to no avail. I can setup a basic project within the IDE but as soon as I add touchGFX I run into 182 undefined reference errors. I have tried starting the project in CubeMX with and without the generate under root box checked and I run into the same issues. I have noticed that by when I attempt to build the project many of my files are crossed out in the project explorer( see screenshot). I have attached a zip file of my attempt to create a blank project that just has touchGFX initialized and builds correctly.

 

Thanks in advance

project_explorer.png

3 replies

TramplerBest answer
Associate III
August 14, 2024
Associate
August 14, 2024

@Trampler Thank you! I was able to get my blank/basic project to compile by adding the touchGFX linker to my cubeIDE linker configuration. Shouldn't this be automatically done by touchGFX when the generate code button is clicked and it modifies the .cproject file?

ST Employee
August 15, 2024

This process is handled automatically, but apparently there is a bug that prevents the libraries from being added to the project. Which version of STM32CubeIDE are you using? 

I've tested with STM32CubeIDE 1.15.0, 1.11.2, and 1.16.0, and I faced the same issue with 1.16.0

ST Employee
August 14, 2024

Hello @cBarney_GEC,

The process of creating a custom project starts from STM32CubeMX. First, you set up your hardware (like enabling display, external RAM, etc.), then you need to enable the TouchGFX Generator under Middleware and Software Packs, and generate code. Now, you will open your TouchGFX project and develop your GUI. Then, you need to generate code from the TouchGFX designer. Finally, you should be able to open .cproject under the STM32CubeIDE directory.

I hope this helps you. Don't hesitate to ask more questions! 

Associate
August 14, 2024

@Mohammad MORADI ESFAHANIASL Thank you for the reply. That is the exact process I have done and when attempting to compile in the STM32CubeIDE I receive almost 200 compilation errors. I am currently following the chain of forum posts that @Trampler provided but I am yet to reach a state that can actually compile.