2024-07-11 05:22 AM
Hi,
I am trying to run a touchgfx designer generated project in cubeIDE but when I go to the IDE and enable I2C1 in the .ioc file... I get the following error while building:
C:/TouchGFXProjects/blabla/TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp:57:10: fatal error: stm32h7xx_hal_ltdc.h: No such file or directory
57 | #include "stm32h7xx_hal_ltdc.h"
compilation terminated.
I am using stm32h735G-DK and touchGFX 4.24.0.
I am a complete newbie here and any help would be greatly appreciated!
Thanks,
Vatsal
2024-07-11 05:37 AM
Make sure the project's Include Path points to the HAL include directory.
If auto-generated and not copied over at that time, use your file manager to copy over from the Cube directory to the project's.
2024-07-11 07:42 AM
Yes, my projects include path points to the STM32H7xx_HAL_Driver/Inc... Is there any other file that I might be missing ?
2024-07-11 09:34 AM
If that is a localized copy of STM32H7xx_HAL_Driver/Inc then you'll want to copy the file it's complaining is missing from the primary repository, wherever you have that situated.
\STM32Cube\Repository\STM32Cube_FW_F7_V1.17.1\Drivers\STM32F7xx_HAL_Driver\Inc\stm32f7xx_hal_ltdc.h
It's complaining about this one file, is it present, or not? If not copy it over, and check if it complains about any others.
I'd half expect stm32f7xx_hal_ltdc_ex.h to be missing too
2024-07-12 05:01 AM
Hello @VH-tech,
I suggest using STM32CubeMX to open the .ioc file, and then you can enable I2C from there and generate code. Then, add your code through STM32CubeIDE.
So, you select the STM32H735G-DK from the TouchGFX designer and create a project:
You navigate to one previous level of your TouchGFX project directory, and open the .ioc file using STM32CubeMX:
Then, you enable I2C1 and press Generate Code:
After that, you need to regenerate code from TouchGFX as well, and then you should be able to compile the project from STM32CubeIDE without any errors.
I hope this helps you. Don't hesitate to ask more questions!