Skip to main content
WhyIsThisSo
Associate III
July 24, 2022
Question

TouchGFX project in CubeIDE

  • July 24, 2022
  • 8 replies
  • 2293 views

Did the following

Create a very simple TouchGFX designer 1 screen with a button

generated code

closed TouchGFX designer

Open CubeIDE

Imported touchgfx project (ioc file)

Build CubeIDE project

Get the following build errors - Why doesn't the CubeIDE project build?

CubeIDE V1.10.1

TouchGFX V4.20.0

I have noticed in the forums that there seems to various ways of created TouchGFX and CubeIDE projects.

What is the ST preferred way of getting a project with TouchGFX into the CubeIDE environment, I am under the understanding that these environment are meant to work together. Is that the point of it all or.is my thinking here stupid.

11:02:35 **** Incremental Build of configuration Debug for project STM32H735G-DK ****

make -j16 all 

arm-none-eabi-g++ "../TouchGFX/target/generated/OSWrappers.cpp" -mcpu=cortex-m7 -std=gnu++14 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32H735xx -c -I../Core/Inc -I../TouchGFX/App -I../TouchGFX/target/generated -I../TouchGFX/target -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -IC:/TouchGFXProjects/Test12345/TouchGFX/generated/fonts/include -IC:/TouchGFXProjects/Test12345/TouchGFX/generated/gui_generated/include -IC:/TouchGFXProjects/Test12345/TouchGFX/generated/images/include -IC:/TouchGFXProjects/Test12345/TouchGFX/generated/texts/include -IC:/TouchGFXProjects/Test12345/TouchGFX/gui/include -O0 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-use-cxa-atexit -Wall -fstack-usage -MMD -MP -MF"TouchGFX/target/generated/OSWrappers.d" -MT"TouchGFX/target/generated/OSWrappers.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "TouchGFX/target/generated/OSWrappers.o"

arm-none-eabi-g++ "../TouchGFX/target/generated/STM32DMA.cpp" -mcpu=cortex-m7 -std=gnu++14 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32H735xx -c -I../Core/Inc -I../TouchGFX/App -I../TouchGFX/target/generated -I../TouchGFX/target -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -IC:/TouchGFXProjects/Test12345/TouchGFX/generated/fonts/include -IC:/TouchGFXProjects/Test12345/TouchGFX/generated/gui_generated/include -IC:/TouchGFXProjects/Test12345/TouchGFX/generated/images/include -IC:/TouchGFXProjects/Test12345/TouchGFX/generated/texts/include -IC:/TouchGFXProjects/Test12345/TouchGFX/gui/include -O0 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-use-cxa-atexit -Wall -fstack-usage -MMD -MP -MF"TouchGFX/target/generated/STM32DMA.d" -MT"TouchGFX/target/generated/STM32DMA.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "TouchGFX/target/generated/STM32DMA.o"

../TouchGFX/target/generated/OSWrappers.cpp:20:10: fatal error: touchgfx/hal/HAL.hpp: No such file or directory

  20 | #include <touchgfx/hal/HAL.hpp>

   |     ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [TouchGFX/target/generated/subdir.mk:28: TouchGFX/target/generated/OSWrappers.o] Error 1

make: *** Waiting for unfinished jobs....

In file included from ../TouchGFX/target/generated/STM32DMA.cpp:22:

../TouchGFX/target/generated/STM32DMA.hpp:22:10: fatal error: touchgfx/Bitmap.hpp: No such file or directory

  22 | #include <touchgfx/Bitmap.hpp>

   |     ^~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [TouchGFX/target/generated/subdir.mk:28: TouchGFX/target/generated/STM32DMA.o] Error 1

"make -j16 all" terminated with exit code 2. Build might be incomplete.

11:02:35 Build Failed. 5 errors, 0 warnings. (took 336ms)

This topic has been closed for replies.

8 replies

MM..1
Super User
July 24, 2022

You mix apples with berry

Imported touchgfx project (ioc file) ioc is MX project file.

For projects created in TGFX (not all) search IDE folder in and .project file. No ioc or other...

If you use KEIL search ...

Normal way to create custom TGFX isnt from TGFX, but new project in IDE or MX.

WhyIsThisSo
Associate III
July 24, 2022

I have tried this way too..

Steps

  1. Create new ST32 Project int CubeIDE
  2. Select Components > TouchGFX fromSoftware Packs (see image)
  3. Save project
  4. Build project

It is my understanding that a TouchGFX folder / files should be in the CubeIDE project?

Is this correct? Or Missing some steps?

0693W00000QM01RQAT.png

WhyIsThisSo
Associate III
July 24, 2022

no answer

MM..1
Super User
July 24, 2022

Yes you miss some steps.

Normal way is:

  1. Create new ST32 Project int CubeIDE
  2. Config HW and LCD to work state in MX wizard
  3. Save project ... generate
  4. Build project

repeat 234 to working LCD

  1. Select TGFX component as on your image and OK
  2. Configure Software pack 0693W00000QM02ZQAT.png
  3. Generate project MX
  4. Refresh project tree in TouchGFX open new template
  5. generate in TGFX and close
  6. Refresh project tree
  7. Build
  8. Next edit TGFX no over template , but over .touchgfx file
WhyIsThisSo
Associate III
July 25, 2022

Hi MM.1

I tried but still missing something, here is a video. I put video in zip file

MM..1
Super User
July 25, 2022

You skip Configure Software pack0693W00000QM02ZQAT.pngand ...