Skip to main content
SMalo.1
Associate
April 14, 2022
Question

MX_TouchGFX_Init(); call and implementation are not the same type.

  • April 14, 2022
  • 5 replies
  • 1512 views

I have a build error where the call to MX_TouchGFX_Init(); in main.c (generated by Cube MX) is different than the one in app_touchgfx.h  UINT MX_TouchGFX_Init(VOID *memory_ptr);, also generated by CubeMX

I am using TouchGFX 4.19.1 in Stm32CubeIDE 1.9

Did anybody ran into that? Any suggestion?

build console output:

../Core/Src/main.c: In function 'main':

../Core/Src/main.c:135:3: error: too few arguments to function 'MX_TouchGFX_Init'

 135 |  MX_TouchGFX_Init();

   |  ^~~~~~~~~~~~~~~~

In file included from ../Core/Src/main.c:29:

../TouchGFX/App/app_touchgfx.h:45:6: note: declared here

  45 | UINT MX_TouchGFX_Init(VOID *memory_ptr);

   |   ^~~~~~~~~~~~~~~~

make[1]: *** [Core/Src/subdir.mk:59: Core/Src/main.o] Error 1

This topic has been closed for replies.

5 replies

Yoann KLEIN
ST Employee
April 19, 2022

Hello @SMalo.1​ ,

Can you please provide more information ?

  • Which version of CubeMX are you using ?
  • Are you using ThreadX OS in your project ?
  • Have you already generated code both in CubeMX and TouchGFXDesigner ?

Thanks,

/Yoann

tech2399
Associate II
May 4, 2022

Any new on this.

We have the same error

MX - 6.5.0.2022.2251913

Using ThreadX OS

Have generated code from Designer and MX

Stefan

SMalo.1
SMalo.1Author
Associate
April 19, 2022

Hello Yoan,

I am using stm32CubeIDE 1.9.0 with Cube MX 6.5.0.20220251

We do indeed use ThreadX in our project (AzureRTOS H7.2.0.0_M7)

No, I have never got CubeMX and TouchGFX Designer to work, we did use TouchGFX Designer to generate some code last year (without STM32CubeIDE) but this was using a Disco (STM32H747) as a target. What I am trying to do now is to use the same STM32H747 as a target, but I tell Cube MX that this is a generic STM32H747 board (I wanted to get that to work before I start on our own hardware, to validate the tools).

SMalo.1
SMalo.1Author
Associate
April 19, 2022

Adding some information that I think might be relevant:0693W00000LyKl1QAF.png0693W00000LyKlaQAF.png0693W00000LyKmdQAF.png0693W00000LyKn2QAF.png 

Visitor II
April 26, 2025

Also have same problem here

GaetanGodart
Technical Moderator
April 28, 2025

Hello @SMalo.1 ,

 

Maybe only one is re-generated when you click on "generate code". You could try to delete the generated files and re-generate.

If this doesn't work, I would advise to update your TouchGFX and STM32CubeMX software.

 

Regards,