cancel
Showing results for 
Search instead for 
Did you mean: 

Link error when build TouchGFX generated project

ANauz.1
Senior II

Hello,

I'm trying to generate with STM32CubeIDE a project generated with TouchGFXDesigner and I encounter a Link Error

  • "missing--end-group; added as last command line option
  • cannot find -l-lW,--end-group

To generate, I do the following:

  • New project in TouchGFX Designer
    • Application template STM32f769I evaluation Kit
    • UI Template "Text Example"
  • I click Generate Code
  • Opening .ioc file with CubeMX, generating code
  • Build project with STM32CubeIDE

My environment is the following:

  • TouchGFXDesigner 4.16.1
  • STM32CubeMX 6.2.1
    • F7 Package firmware 1.16.0
    • Also try after migrating to 1.16.1
  • STM32CubeIDE1.6.1

Any help would be welcome

Thank you

Antoine

13 REPLIES 13
ANauz.1
Senior II

In STM32CubeIde project option, I found:

  • MCU G++ Linker
    • Libraries
      • "Use C math library (-Wl, --start group -lc -lm -lstdc++ -lsupc++ -Wl, --end-group"

By default it is "checked"

Unchecking it do not change anything! :(

Romain DIELEMAN
ST Employee

Just to be sure, after generating code from STM32CubeMX you will also need to generate code from TouchGFX Designer.

/Romain

Yes,

In TouchGFXDesigner I click on "Generate Code" (F7), otherwise, there are some files missing.

After that I use MX to generate Code, and then finaly IDE

Antoine

Exactly, I fear you missed a step: whenever you generate code from CubeMX you need to re - generate code from TouchGFX Designer right after.

ANauz.1
Senior II

Ok! So...

I found a "methode" to correct the error.

In the project properties:

  • C/C++ Build --> Settings
    • MCU G++ Linker --> Libraries

In the tab "Libraries (-l)", there is ":libtouchgfx-float-abi-hard.a"

I though the ":" was an error. So I removed it, and put it back as the lib with no more found.

After that, it work... no idea why!!

The link command before the modification was:

--start-group -l:libtouchgfx-float-abi-hard.a -l -Wl,--end-group

After, it became:

--start-group -l:libtouchgfx-float-abi-hard.a -Wl,--end-group

Antoine

Same error even after regenerating with TouchGFX Designer

Good to hear it works now. This is intriguing, I was not able to reproduce your issue. What process did you follow to work with STM32CubeIDE ? Did you just double click on the generated project ?

/Romain

It is like the linker try to like with 2 libraries, but only one is known, and the second is left "blank"

In the project properties:

  • C/C++ General--> Paths and Symbols
    • Libraries

There are 2 lines:

  • first with :libtouchgfx-float-abi-hard.a
  • second is empty

Strange!

Removing the second line also resolve the error