cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX project in CubeIDE

WhyIsThisSo
Associate III

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)

8 REPLIES 8
MM..1
Chief II

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

no answer

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

MM..1
Chief II

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

Hi MM.1

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

You skip Configure Software pack0693W00000QM02ZQAT.pngand ...

OK, got it now.. thanks for your help :)

If solved mark it.
And FYI creating this way is good for custom project. You need write and manage hw drivers or copy edit some BSP files .
If you work on DISCO or EVAL, you can create in TGFX, but need right steps to import to IDE and some example projects isnt prepared for this.