Skip to main content
Martin KJELDSEN
Principal III
May 21, 2019
Question

STM32CubeIDE and TouchGFX 4.10.0: Resolving compilation issues

  • May 21, 2019
  • 95 replies
  • 18134 views

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

This topic has been closed for replies.

95 replies

SCW
Visitor II
October 15, 2019

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_it
Senior II
October 15, 2019

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 :)

SCW
Visitor II
October 15, 2019

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.

zul-a
Visitor II
October 16, 2019

@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)

Martin KJELDSEN
Principal III
October 17, 2019

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

scottSD
Senior III
October 18, 2019

Martin, can you explain this?

By doing this manually, does that mean it has to be "excluded" from the build process within Stm32CubeIDE?

zul-a
Visitor II
October 17, 2019

@Martin KJELDSEN​ 

Thanks. Found it after a bit of digging. Next time please post the link in the comment...=)=)=)=)

Regards

Martin KJELDSEN
Principal III
October 17, 2019

Sure ;) The release note is a sticky at the top of this forum.

/Martin

ALI3
Associate
November 12, 2019

Hello Everyone,

I do the settings as following screenshots and then I generate code and resolve the issues on CubeIDE.

Now when download the program on STM32F469-Disco board the screen remains black (all 4 LEDs are on).

Would you please let me know what is missing?

Thanks,

0690X00000Arra8QAB.png

0690X00000Arra3QAB.png0690X00000ArraDQAR.png0690X00000ArrZyQAJ.png0690X00000ArrZtQAJ.png0690X00000ArrZoQAJ.png0690X00000ArrZjQAJ.png

Martin KJELDSEN
Principal III
November 13, 2019

Well, difficult to say - What you're showing me here is the hardware configuration only.

How did you create this project? What's driving TouchGFX?

/Martin

ALI3
Associate
November 13, 2019

Hi Martin,

The project trend is as follow:

STM32CubeMX (V5.4.0)

Board Select (STM32F469) (STM32Cube_FW_F4_V1.24.1) + default Discovery pin configuration

Set CubeMX to generate code for CubeIDE with seperate *.c and *.h file

Set Hardware Configuration and Execute TouchGFX (V4.12.3)

Draw some Box and add some Scaled Pictures

Return to CubeMX and regenerate program then open project in CubeIDE

Exclude Simulator files from build (I don't add "***_ts" files yet)

Some problem with MX_FREERTOS_Init and GRAPHICS_MainTask, I add a header to project with following code and include it in "Main.cpp", "freertos.cpp", and "BoardConfiguration.cpp"

#ifndef SharedHeader_H
#define SharedHeader_H
 
#ifdef __cplusplus
extern "C" {
#endif
 
extern void MX_FREERTOS_Init(void);
extern void GRAPHICS_MainTask(void);
 
#ifdef __cplusplus
}
#endif
 
#endif /* SharedHeader_H */

Finally I add two line in FLASH *.ld to address QSPI memory:

QSPI (rx) : ORIGIN = 0x90000000, LENGTH = 16M //Added to Memories definition
ExtFlashSection : { *(ExtFlashSection) } >QSPI //Added afeter ARM attributes

Then I compile and download the program. All 4 LEDs are still on and screen is black.

This is my story...

Hope you can help me with this!

PS1: If I use TouchGFX board simulator from the very first step without using cubeMX, the design runs on board. But I need cubeMX to add other peripherals and manage then. As you know TouchGFX simulator does not provide *.ioc for cubeMX.

PS2: I suggest TouchGFX to make the *.ioc file and have an option to choose target IDE instead of generate all IDEs interface.

PS3: Thank you for your great work on beautiful GUI design software...

FJB2069
Senior
November 18, 2020

Martin,

I am trying to get an STM324291-eval board up and running through TouchGFX and CubeIDE. Coming up with similar build errors. Tried following your example above with Discovery Board, but not having much luck.

Would have thought this would have been fixed by now!

Can you provide my a solution for this eval board?