cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX, TouchGFX and Keil uVision integration problem

R.
Associate II

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.

6 REPLIES 6

Hello @R.​ 

Thanks for the feedback,

It will be fixed next CubeMX release.

Regards,

Nesrine

MSm
Associate II

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.

R.
Associate II

Hi,

I found the solution.

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

Can you be more specific? Thanks

Great! Which files did you have to add?

R.
Associate II

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.