cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal error with touchgfx custom board generated code

pranavmv012
Associate II

I have an STM32H745 custom board project. I use LTDC dispaly , DMA2D and CRC. not yet implemented touch sensor. I would like to just show a logo(image on my 480*480 display). I am generating code form cubemx(v6.12.1) added xcubetouchgfx(4.24.1). I have generated code no under root. I opened .part file made a simple UI with a box and text and generated code. now if i compile the project, there are few fatal errors. it says no such directory or file. I try to manually add it still issue persist. I added include paths as mentioned in this document https://support.touchgfx.com/docs/development/ui-development/working-with-touchgfx/using-ides-with-touchgfx

but no use. I am not using os and it is a dual core MCU. 

pranavmv012_0-1729735235740.png

Any help to fix the issue is highly appreciated. 

9 REPLIES 9
GaetanGodart
ST Employee

Hello @pranavmv012 and welcome to the community! :smiling_face_with_smiling_eyes:

 

I had to fix a similar issue recently.

Can you do a research in your full project to find BlitOp.hpp? I recommend the software called "Everything" by voidtools.

Can you send a screenshoot of your included paths, included libraries and libraries paths?
Also, make sure that you check it for the right MCU.

I would guess that you did not include all the files that need to be included. In the last link you share, we do recommend files to include but this is not all of them as we say in the green box:

GaetanGodart_0-1729762173730.png

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello Gaetan, Thanks for the response. 

I did the above project on the discovery board. I was getting those error. actually i am developing this for a custom board. As the touchgfx documentation say, i added crc, dma2d, ltdc and verified the iroc. i have few other peripherals running as well. then added xcubetoughgfx and generated code. unfortunately, cubemx does not setup correct path to souce and include file for cubeide. I had added the include path as shown in the picture. 

pranavmv012_0-1729775313441.png

when the cubemx project created the first error i got is it has not included no such file as app_touchgfx.h. then i added that then it shows below error

pranavmv012_1-1729775445844.png

I guess the project does not see app_touchgfx.c for some reason. I was expecting cubemx and ide to do this for me. I added path to source file as show below,

pranavmv012_2-1729775568533.png

this does not help. Is there a way to fix this. This is a custom board on stm32h745 and the touchgfx and dependent peripherals are running on M7. I am using the latest version of all software from ST. I have to meet a deadline and adding everything manually is time consuming and i am pretty new to touchgfx and cubeide and I don't where i am heading by adding the paths manually. 

"Everything" by voidtools - thanks for recommendation, amazing speed

Hello @pranavmv012 ,

 


I did the above project on the discovery board. I was getting those error

If you did a project using a discovery board (STM32H745-DK) it should just work. Click on "Generate code" from TouchGFX Designer, then open the STM32CubeIDE project from the STM32CubeIDE folder.
Then what errors do you get?

What difference can you see from the STM32H745-DK project compared to your custom project?

You should also check the "Includes", "Libraries" and "Library Paths" tabs?

Have you looked at voidTools and searched for the function that is called? I asked you to do this because I assume that some of the functions you are "missing" are in the TouchGFX library (touchgfx.a) and therefore cannot be seen by a standard project search on VS Code for instance.
If it happens, then it means you need to include the library in the path.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

If you like Everything, you will also like WinDirStat! ;)

Gaetan Godart
Software engineer at ST (TouchGFX)

My goal is to intergrate touchgGFX for the custom board. The issue I am facing is exactly this https://community.st.com/t5/stm32cubemx-mcus/stm32h747iitx-undefined-reference-to-touchgfx-init-its-stm32/m-p/154926

I have tried the suggestion like starting the project from IDE by giving C++ as language, not generating the project under the root. When I check the generated code, the generated touchgfx code is not properly included by cubeide or cubeMX. 

Now, I generated a code for stm32h745discovery board and loaded to the kit and it works fine. but when modify the ioc, just enable crc, ltdc and dam2d, remove rtos (this is what i want on the custom board) and generate code, the generated code has exact same problem. 

Hello @pranavmv012 ,

 

The link you shared tells that the fix is to select C++ (because TouchGFX uses C++, not C).
So when you start a project from STM32CubeIDE, it works, you just have to include the necessary files and libraries that are not included by STM32CubeIDE.

 

If you create a project from TouchGFX Designer, CRC should be enabled by default.
To remove the RTOS, it means you will use TouchGFX on bare metal, you have to follow this guide : scenarios-configure-rtos#no-os 

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
MM..1
Chief III

@pranavmv012 wrote:

made a simple UI with a box and text and generated code. now if i compile the project, there are few fatal errors.

Situation relative normal. On some points IDE projects require use REFRESH from context menus before compile...

Hello @pranavmv012 ,

 

Have you been able to move forward on your issue?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)