2018-12-17 04:48 AM - edited 2023-11-20 03:13 AM
Note:
Recommended to use latest X-Cube-TouchGFC 4.13 release. Can be downloaded here: https://www.st.com/content/st_com/en/stm32-graphic-user-interface.html
Documentation link: https://touchgfx.zendesk.com/hc/en-us/sections/360003093319-TouchGFX-Releases
Guides for using TouchGFX with CubeMX & Known limitations.
This forum post will be updated along with newly acquired information regarding the interoperability of CubeMX and TouchGFX.
TouchGFX knowledge base article overview:
Link: https://touchgfx.zendesk.com/hc/en-us/articles/360020001492-Getting-Started-with-CubeMX-and-TouchGFX
This guide gives a general introduction to the workflow of creating an application for graphics with CubeMX and TouchGFX.
There are two ways of getting started with graphics on a ST discovery board
- 1: In TouchGFX Designer select one of the CubeMX enabled Application Templates and start developing graphical applications
- 2: In CubeMX select the desired STBoard from the board selector and add the TouchGFX graphic component.
Please note, that CubeMX does not provide implementation for BSP layer, these files are located in the respectively STM32Cube package for the selected STBoard.
https://touchgfx.zendesk.com/hc/en-us/articles/360019884752-Configuring-STM32F746G-DISCO
This guide describes how to enable TouchGFX graphics on a STM32F746G-DISCO board stating from the STBoard selector in CubeMX.
Opening from TouchGFX Designer, please note that the Application Template contains 2 versions. Version 2.0 is advised.
https://touchgfx.zendesk.com/hc/en-us/articles/360020001992-Configuring-STM32F7508-DISCO
This guide describes how to enable TouchGFX graphics on a STM32F7508-DISCO board stating from the STBoard selector in CubeMX.
https://touchgfx.zendesk.com/hc/en-us/articles/360020208091-Configuring-STM32F769I-DISCO
This guide describes how to enable TouchGFX graphics on a STM32F769I-DISCO board stating from the STBoard selector in CubeMX.
Opening from TouchGFX Designer, please note that the Application Template contains 2 versions. Version 2.0 is advised.
Additional known limitations / updates:
IDEs / Compilers:
IAR is currently working best out-the-box.
More work is needed when using Keil, Atollic, SW4STM32.
Missing BSP Layer
Generating a TouchGFX project from CubeMX, drivers for external components like touch controller and QSPI flash is missing.
TouchGFX Designer error message.
Starting from TouchGFX Designer with an Application templates based on a CubeMX project, the following message appears “Project was modified outside externally�?.
TouchGFX Designer renames the CubeMX and EWARM project files to match the name of the TouchGFX project file.
TouchGFX 4.10
The newest released TouchGFX version is 4.10, available in F4 and F7 Cube packages, and TouchGFX Designer as a stand-alone here; https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/touchgfxdesigner.html
2019-02-20 12:52 PM
I hope these snips help - here's my working settings (make sure the library file is REALLY there too - mine wasn't until copied over)
I see an extra reference to the same library was generated when I used SMT32CubeMX again as a test!! So there are TWO different styles for finding the libraries...
2019-02-21 03:32 AM
Hello @BBenn ,
Thanks for reply.
I did as your prints but the error is still there..
Here is what the gcc returns:
"c:/program files (x86)/atollic/truestudio for stm32 9.0.1/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: cannot find -ltouchgfx"
I tried to override the files as you sad but didn't work.
2019-02-21 05:05 AM
Well.. I could figure out this problem, I don't know the reason but the lib touchgfx wasn't added in the Atollic folder tree, although the file is located in the windows folder... I only added in the folder tree and it works!
But now I have other problem with GPIO initialization, the compiler returns that there are multiple definitions. Anyone can explain if this initialization is made from TouchGFX library or CubeMX Hal?
"\Debug/..\Src/gpio.c:79: multiple definition of `MX_GPIO_Init'"
"Debug/../Src/BoardConfiguration.cpp:82: undefined reference to `touchgfx::GPIO::init()'"
I'm thinking in migrate to SW4STM32...
Thanks.
2019-02-21 05:17 AM
It appears only one is missing - libtouchgfx.a (which might not be needed?).
Is it actually in the folder??
I tested the build WITHOUT libtouchgfx.a - and it works fine, just REMOVE that library from "Libraries".
(You can also remove the first entry - the second is how STM32CubeMX generates the settings)
2019-02-21 05:22 AM
@BBenn , the missing files are used by the simulator. Learned this from @Martin KJELDSEN.
or building through the designer the mingw32 library must be present: Middlewares\ST\TouchGFX\touchgfx\lib\win\mingw32\libtouchgfx.a
The SDL libs are inside: Middlewares\ST\TouchGFX\touchgfx\lib\sdl2\win32
We just cut & pasted the above from another working project and this fixed our simulator.
2019-02-21 05:45 AM
@BBenn , if I remove this library the compiler returns the same error. But I think is necessary because below you can see that the compiler call some functions in this library "touchgfx::HAL::tick()" for example.
Here is my situation:
Thanks.
2019-02-21 06:08 AM
All of those are library functions.
I am thinking perhaps your issue is the "Multiple definitions of MX_GPIO_Init" - there should only be ONE in main.cpp. I wonder if you have a second file included in the build with this function defined?
2019-02-21 06:21 AM
@BBenn , I have the MX_GPIO_Init function implemented in the gpio.c (generated by cube) and the call in the main.cpp, nothing else. Everything was generated by CubeMX.
About the second file I already searched for this function and appears only in gpio.c, gpio.h and main.cpp files.
Thansk for reply.
2019-02-21 07:33 AM
Oddly, my generated main.cpp has MX_GPIO_Init (the actual function) at line 1220, and I have no file GPIO.c (GPIO.cpp is just a base type).
Something is very different between what you have generated and mine.
2019-02-21 11:19 AM
Could anyone share the project with Atollic + TouchGFX + CubeMX compiling?
At the forum I found the project only for SW4STM32...
Thanks.