Skip to main content
ANauz.1
Senior
May 18, 2021
Question

Link error when build TouchGFX generated project

  • May 18, 2021
  • 3 replies
  • 2027 views

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

This topic has been closed for replies.

3 replies

ANauz.1
ANauz.1Author
Senior
May 18, 2021

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
May 18, 2021

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

/Romain

ANauz.1
ANauz.1Author
Senior
May 18, 2021

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

Romain DIELEMAN
ST Employee
May 18, 2021

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
ANauz.1Author
Senior
May 18, 2021

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

Romain DIELEMAN
ST Employee
May 18, 2021

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

ANauz.1
ANauz.1Author
Senior
May 18, 2021

After generating with CubeMX, there is a popup with "Open Folder", "Open Project" and "Close"

I selected "Open Project"

I do not know if it could change anything, but my TouchGFX Project directory is not in my CubeIDE Workspace directory!