cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE and TouchGFX 4.10.0: Resolving compilation issues

Martin KJELDSEN
Chief III

Hi everyone,

I've removed the previous, textual guide. Instead, here's a video guide on how to get CubeIDE and TouchGFX working on an STM32F746G-DISCO board. I accidentally exported the video in 720p but have created a 1080p version. Leaving both links here because the 720p version may have useful comments and resolutions:

1080p: https://youtu.be/VOs2LYO7wSA

720p: https://youtu.be/xZ0pPhQCQUY

And here's the project i created and modified:

https://community.st.com/s/question/0D50X0000At0N95SQE/cubeide-100-touchgfx-4100-working-project-inside-stm32f746gdisco

 (NOTE: This project does not have the modifications from our STM32F746G-DISCO/CubeMX article).

Best regards,

Martin

95 REPLIES 95

As promised since the build issues prevent me from being productive: https://github.com/replaysMike/STM32CubeIDE-TouchGFX-Fix

Feel free @Martin KJELDSEN​  to post it somewhere more visible, if it works out for you (works for me!)

Hi @Community member​ , thanks! I couldn't agree with you more re: the annoyance. We already made a patch a while ago, but it's tied more directly to the touchgfx designers way of running post-generate to fix up mistakes in CubeMX/CubeIDE. And that's a really annoying thing to have to distribute.

We tested the new version of CubeIDE yesterday and these issues have been fixed (Anything related to SDL2 has been excluded). Until that's released, use your patch.

Thanks for your contribution!

/Martin

Wohoo, CubeIDE 1.1.0 is available :)

I just tested it and sure enough - I don't need the tool anymore after changing HW properties! Yay!

@Martin KJELDSEN​ Does that mean that the next TouchGFX release is just around the corner as well? :)

SCW
Associate

Maybe I am missing something here....

I uninstalled cube ide 1.0.2

installed cube ide 1.1.0, created a new project, and still got the SDL2 compile error. I still had to manually exclude all the simulator folders and the SDL2 file in order to get it to compile. Touch still does not work. This is with the F746G discovery.

@HP​  Btw, your yt vids are awesome, great explanations and step by step instructions. Keep up the great work!

HP
Senior III

Thanks :) I'm glad others can use them!

You still have to remove the SDL includes manually. The BIG thing here (and it really is a big thing!) is that you can enter the .ioc file and change the HW setup. In my video I mention that you only have one shot at getting the hardware setup right. This is no longer the case. and you don't need to use Michaels tool anymore (as far as I can see!)

You still need to edit the touchGFX designer file (change the postGenerate command to 'echo test' or something else) and include the touch screen code yourself. you most likely also have to change the QSPI parameters yourself - I haven't checked that.

So there's still some way to go but we definitely moved a lot closer with the 1.1.0 release :)

Thanks for the response. I did test that shortly after my post and indeed it did not break like the prev version. Appreciate all the contributions and hard work from st.

That's great I'm going to try it out today.

I'll make a release note today on this forum

/Martin

zul-a
Associate II

@Martin KJELDSEN​  Hi Martin

I can see that there is version 1.1.0 of STM32 Cube IDE out now. I was hoping that some of these integration issues would be fixed in this release. That does not seem to be the case as the program generates errors the moment I add touchgfx in my project. Is the fix for this age old problem still on ongoing?

Thanks

./TouchGFX/target/BoardConfiguration.cpp:1:10: fatal error: common/TouchGFXInit.hpp: No such file or directory
 
 #include <common/TouchGFXInit.hpp>
 
     ^~~~~~~~~~~~~~~~~~~~~~~~~
 
compilation terminated.
 
make: *** [TouchGFX/target/subdir.mk:36: TouchGFX/target/BoardConfiguration.o] Error 1
 
make: *** Waiting for unfinished jobs....
 
../TouchGFX/target/STM32F7DMA.cpp:2:10: fatal error: touchgfx/hal/OSWrappers.hpp: No such file or directory
 
 #include <touchgfx/hal/OSWrappers.hpp>
 
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
compilation terminated.
 
make: *** [TouchGFX/target/subdir.mk:40: TouchGFX/target/STM32F7DMA.o] Error 1
 
../TouchGFX/target/STM32F7HAL.cpp:2:10: fatal error: touchgfx/hal/OSWrappers.hpp: No such file or directory
 
 #include <touchgfx/hal/OSWrappers.hpp>
 
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
compilation terminated.
 
make: *** [TouchGFX/target/subdir.mk:42: TouchGFX/target/STM32F7HAL.o] Error 1
 
../TouchGFX/target/STM32F7Instrumentation.cpp:5:10: fatal error: touchgfx/hal/HAL.hpp: No such file or directory
 
 #include <touchgfx/hal/HAL.hpp>
 
     ^~~~~~~~~~~~~~~~~~~~~~
 
compilation terminated.
 
make: *** [TouchGFX/target/subdir.mk:44: TouchGFX/target/STM32F7Instrumentation.o] Error 1
 
"make -j8 all" terminated with exit code 2. Build might be incomplete.
 
 
 
21:03:12 Build Failed. 9 errors, 0 warnings. (took 2s.388ms)

If you read the release article i posted you'd know that you now have to press "Generate code" manually to generate TouchGFX files :)