Skip to main content
KSUNG.2
Visitor II
March 29, 2021
Question

TouchGFX/App/app_touchgfx.o: in function `MX_TouchGFX_Init'

  • March 29, 2021
  • 19 replies
  • 8015 views

***Settings

MCU: STM32F405RG

CubeMx: 6.2.0

CubeIDE: 1.6.0

TouchGFX: 4.16.1

Firmware Package: FW_F4 1.26.0

0693W000008y84wQAA.pngI am trying to port a program designed in Windows to firmware.

STM32CubeIDE was the first time I used it, so I studied it through the community.

And, I proceeded the work in the following order.

1.Select MCU via STM32Cubemx

2. Pinout setting

3. Select TouchGFX from software pack

4. generate code

5. Create 1 page with shapes in TouchGFX

6. generate code

7. Run STM32CubeIDE

8. Run Debug

For reference, I haven't written any user code.

Then the following message appeared.

TouchGFX/App/app_touchgfx.o: in function `MX_TouchGFX_Init'

undefined reference to 'touchgfx_init'

Settings related to TouchGFX appear to be a problem, but I haven't been able to find the cause.

Could you please let me know the problem?

0693W000008y83PQAQ.png 

0693W000008y83UQAQ.png0693W000008y83ZQAQ.png 

This topic has been closed for replies.

19 replies

KRega.1
Associate III
April 17, 2021

Hi did you ever solve this problem? I'm having the same exact issue...

Kevin

Romain DIELEMAN
ST Employee
April 19, 2021

Hi,

Could you share a screenshot of how you configured TouchGFX in your STM32CubeMX project ? Are you working with an RTOS ?

/Romain

KRega.1
Associate III
April 19, 2021

Thanks Romain for getting back to me. No OS, just bare metal.

0693W000008zzmAQAQ.png0693W000008zzm5QAA.png 

KRega.1
Associate III
April 19, 2021

No OS, Just baremetal for now.

KRega.1
Associate III
April 22, 2021

0693W00000AMIXvQAP.png0693W00000AMIXmQAP.pngRomain,

After reading all day/watching videos and almost giving up hope, I created a new blank project going through Mx first to generate files and that worked. Earlier I started with the STM32cubeIDE. Maybe that was the problem? Also I remember TouchGFX or MX being updated to next version (current one that is out now). This could also have caused a problem? Or simply my file structure was wrong because generating all the files from MX, then opening it in the STM32cubeIDE gave me a very different file structure... :face_with_tears_of_joy:

Romain DIELEMAN
ST Employee
April 23, 2021

I am happy to hear that it works now at least :grinning_face_with_sweat:

You are right concerning the path difference between creating a project from CubeMX or CubeIDE, it seems very likely that this could be the source of the error (which is then fixable as well, but just move on, no need for you to spend more time on it.

To be honest I always start my project from CubeMX for this reason (this is our process as well when we create new application templates since we wish to also support different toolchains/IDE), I need to force myself to start creating projects directly from CubeIDE, since most of the users like you do it, in order to try to face the same errors.

/Romain

KRega.1
Associate III
April 22, 2021

Something else I observed too. STM32CubeMX 6.1.1 is my version when I created opened this app independently and created the working version. When I accessed the MX from my STM32cubeIDE the version was 6.2.1...

Romain DIELEMAN
ST Employee
April 23, 2021

This is something you can set within STM32CubeIDE, but I can't remember how sorry. Have a look at the documentation or create another post with the STM32CubeIDe tag in it if you wish to do this.

/Romain

Htery.1
Visitor II
May 27, 2021

I am facing the same issue in my device please guide me the reason why its not resolving I tried three or four times but its the same result every time.

Romain DIELEMAN
ST Employee
May 27, 2021

Hi,

Could you give more information on your setup ? What version of TouchGFX/STM32CubeMX/STM32CubeIDE are you using ? What MCU are you using ? Are you using a custom board or a ST development kit ? Are you using an RTOS? Could you share your project or screenshots of your errors ?

/Romain

Aarra.1
Associate III
September 30, 2021

Hello,

I'm facing the same exact problem as mentioned in this thread in the start.

Versions of software's

STM32CubeIDE 1.7.0

STM32CubeMX 6.3.0

TouchGFX 4.17.0

I'm using STM32H757I-eval board.

And I'm not using RTOS.

I have tried creating the project from the STM32CubeIDE and STM32CubeMX

But still I'm getting the same exact errors as the screenshot in the beginning.

I have tried all possible ways I could but I'm not able to solve the issues.

Please do provide me a solution for the same.

Regards.