Skip to main content
R._it
Associate II
October 1, 2019
Question

STM32CubeMX, TouchGFX and Keil uVision integration problem

  • October 1, 2019
  • 4 replies
  • 1853 views

Hello,

I am facing compilation problem in Keil when generating code from STM32CubeMX (choose GRAPHICS - TouchGFX) as follow:

cannot open source input file touchgfx/hal/OSWrappers.hpp

Also if I open the Keil code which generated from the TouchGFX then the code is easily compile and flash in the STM32.

I am using STM32F746G-DISCO DISCOVERY BOARD.

Can anyone tell how I overcome this problem ?

Thanks in advance.

This topic has been closed for replies.

4 replies

Nesrine.JLASSI
Visitor II
October 3, 2019

Hello @R.​ 

Thanks for the feedback,

It will be fixed next CubeMX release.

Regards,

Nesrine

MSm
Associate II
November 3, 2019

hi

in cube 5.4 and GFX4.12.3 this problem still exists.

when generate project with cubemx and TouchGFX, and compile with keil, many errors occurs. many #includes must correct and ...

Thanks in advance.

Martin KJELDSEN
Principal III
November 5, 2019

Can you be more specific? Thanks

R._it
R._itAuthor
Associate II
November 5, 2019

Hi,

I found the solution.

I add some files to the project folder then it works.

Martin KJELDSEN
Principal III
November 5, 2019

Great! Which files did you have to add?

R._it
R._itAuthor
Associate II
November 5, 2019

First thing, touchgfx generated files should be inside the project folder generated by CUBEMX.

In touchgfx folder, there is a target folder which contains the board configuration, gpio, hw init and some more code files.

Now, if we compile code in keil there will be no error.

But touch will not work.

For touch, add BSP folder in Drivers folder.

BSP -> Components -> ft5336.h and ft5336.c

BSP -> STM32746G-Discovery -> stm32746g_discovery.c and .h

stm32746g_discovery_ts.c and .h

Also, these files must be include in keil and unmasked the touch code in STM32F7TouchController.cpp file.