cancel
Showing results for 
Search instead for 
Did you mean: 

STM322CubeMX generated code that includes the package X_CUBE_TOUCHGFX is not compiling successfully

JKhal.1
Associate II

I am trying to compile the generated code from STM32CubeMX that already has an activated X_CUBE_TouchGFX package with no success.

there is a lot of missing files! so I did generate a project using the TouchGFX Designer and tried to add all the missing files to my project, this partially solved the problem, cause there are files that include the DSI driver.

the microcontroller I am using is STM32H747XI and I believe that because the evaluation board for this microcontroller "STM32H747I-DISCO " uses DSI mode the files using it is generated although the DSI peripheral is not activated on my IOC file and I still have errors that header files is missing and don't know how to fix it!.

In general, how can I create a new TouchGFX project for my custom board that uses STM32H747XI microcontroller without the DSI peripheral, instead I am using an RGB interface with the LCD?

Another related issue was that when I generated the code using STM32CubeMX or STM32CubeIDE the generated project settings said that the project isn't CDT and the C/C++ Build tap wasn't existing in the project properties, to fix that I copy and pasted .cproject files for each core from example project for the evaluation board generated by TouchGFX designer!

Please I want help to bring up my project.

I will be glad to get help for the following:

1. how to create a custom TouchGFX project for my custom board

  • my custom board uses RGB without the DSI mode
  • my board uses SPI to interface with external RAM instead of FMC

2. How to fix the compiler errors for missing files that my project doesn't need like the DSI driver.

Best Regards

JKhal

5 REPLIES 5
MM..1
Chief III

Seems you create project , but not right way steps. On start you skip touchgfx and create project with MX or i preffer IDE and plugin MX. Setup all except TGFX.

Build configure memory and LCD to work state, after this you can add TGFX and regenerate ioc.

This create for you template file tgfx , that need be opened once and generate starting gui.

Close designer and back in IDE refresh project and build.

Hi,

First of all, thank you for your help.

I did deactivate the TouchGFX package from the IOC file and then created a new project using the IOC file but still, I got the same error, although the DSI is not activated on the IOC file still the IDE gives me an error cause it doesn't find the DSI driver header, see the attached screenshot.

0693W00000Kcn7bQAB.pngThank you

JKhal

Hi Again,

I figured that the DSIHOST and LTDC is linked on the IOC file, either both are on or both is off,

This is the DSIHOST configuration that makes the problem:

0693W00000KcnQnQAJ.pngBut when I chose the DSIHost to be "command Mode via APB interface" (see the photo below)the build error disappears and the project compiles correctly, but I don't need the DSIHOST which already activates 6 pins, and I really don't know what this DSIHOST can help me with when my LCD interface is RGB 24 pins and it's not MIPI.

0693W00000KcnSyQAJ.png 

After my last comment (where I successfully generated and compiled an empty project), I added the TouchGFX pack to the CubeMX throw the IDE, regenerated the code, and then opened the created TouchGFX project and added just one image saved it, and generated the code from TouchGFX, after that, I cleaned the project and tried to build it, this caused a lot of errors, suddenly the IDE can't find the header for the HAL functions!!

B

est Regards

JKhal

MM..1
Chief III

Seems as bug in MX. For solve copy file to project drivers

from

C:\Users\.......\STM32Cube\Repository\STM32Cube_FW_H7_V1.9.1\Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_dsi.h 

and next bug here is you need manualy mark all GPIO LTDC pins with alternate for RGBxxx.

DSI leave Disabled. MX wizard stupidly add only 12 from 28 GPIO LTDC pins.