Skip to main content
JHERI
Associate III
September 18, 2023
Question

Why is there so little training and examples on TouchGfx !!!!

  • September 18, 2023
  • 10 replies
  • 6477 views

Hi Guys

How on earth does ST expect anyone to use, learn and embrace their products when there seem to be so little help , videos training??

TouchGFX is appalling for step by step examples, YES it's free, but no value to engineers if you have no idea or can't understand Toucgfx  

I have been days traying to create an event  from a custom container with a toggle switch

under the container I have created an event for a toggle button

I have called the container panel which holds the toggle button and event

under generated gui I see the generated event handler

I then want to copy that event handler in to panel.cpp and create a new event for a custom container

 

The compiler just errors every time ????? I ready to lunch the PC 

There must be a better easier way than touch GFX, im sure its great if you know what on earth you are doing

 

 

 

 

 

This topic has been closed for replies.

10 replies

JHERI
JHERIAuthor
Associate III
September 18, 2023

 

this is the generated code

when i try to add this to add this to panel.cpp     (the custom container, just compiler errors ???

void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src)
{
if (&src== &ch1_tog)
{
//ev
//When ch1_tog clicked call virtual function
//Call ev
ev();
}
if (&src== &ch8_tog)
{
//JIMJIM
//When ch8_tog clicked call virtual function
//Call JIMJIM
JIMJIM();
}

JHERI
JHERIAuthor
Associate III
September 18, 2023

if I only try one event like below....

void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src)

{

if (&src== &ch1_tog)

{

//ev

//When ch1_tog clicked call virtual function

//Call ev

ev();

}

 

}

i still get errors ???

15:03:55 **** Incremental Build of configuration Debug for project Riverdi_70STM32H7_CM7 ****

make -j8 all

arm-none-eabi-g++ "C:/TouchGFXProjects/Train/CM7/TouchGFX/gui/src/containers/Panel.cpp" -mcpu=cortex-m7 -std=gnu++14 -g3 -DDEBUG -DCORE_CM7 -DUSE_HAL_DRIVER -DSTM32H747xx -c -I../../../CM7/Core/Inc -I../../../CM7/FATFS/Target -I../../../CM7/FATFS/App -I../../../CM7/TouchGFX/App -I../../../CM7/TouchGFX/target/generated -I../../../CM7/TouchGFX/target -I../../../Drivers/STM32H7xx_HAL_Driver/Inc -I../../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../../../Utilities/JPEG -I../../../Middlewares/Third_Party/FatFs/src -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 -I../../CM7/../../CM7/Middlewares/ST/touchgfx/framework/include -I../../CM7/../../CM7/TouchGFX/generated/fonts/include -I../../CM7/../../CM7/TouchGFX/generated/gui_generated/include -I../../CM7/../../CM7/TouchGFX/generated/images/include -I../../CM7/../../CM7/TouchGFX/generated/texts/include -I../../CM7/../../CM7/TouchGFX/generated/videos/include -I../../CM7/../../CM7/TouchGFX/gui/include -I../../../CM7/USB_HOST/App -I../../../CM7/USB_HOST/Target -I../../../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../../../Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc -O0 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-use-cxa-atexit -Wall -femit-class-debug-always -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Application/User/gui/Panel.d" -MT"Application/User/gui/Panel.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Application/User/gui/Panel.o"

arm-none-eabi-g++ -o "Riverdi_70STM32H7_CM7.elf" @"objects.list" -l:libtouchgfx-float-abi-hard.a -mcpu=cortex-m7 -T"C:\TouchGFXProjects\Train\STM32CubeIDE\CM7\STM32H747XIHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="Riverdi_70STM32H7_CM7.map" -Wl,--gc-sections -static -L../../CM7/../../CM7/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc -LC:/TouchGFXProjects/70STM32H7_v4_Copy/CM7/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc -LE:/TouchGFX/4.22.0/designer/Riverdi_70STM32H7/CM7/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc -LC:/TouchGFXProjects/MyApplication_56/CM7/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc -LC:/TouchGFXProjects/Train/CM7/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group

C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Application/User/gui/Panel.o: in function `PanelBase::buttonCallbackHandler(touchgfx::AbstractButton const&)':

C:/TouchGFXProjects/Train/CM7/TouchGFX/gui/src/containers/Panel.cpp:22: multiple definition of `PanelBase::buttonCallbackHandler(touchgfx::AbstractButton const&)'; ./Application/User/generated/PanelBase.o:C:/TouchGFXProjects/Train/CM7/TouchGFX/generated/gui_generated/src/containers/PanelBase.cpp:296: first defined here

collect2.exe: error: ld returned 1 exit status

make[1]: *** [makefile:100: Riverdi_70STM32H7_CM7.elf] Error 1

make: *** [makefile:93: all] Error 2

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

 

15:04:00 Build Failed. 4 errors, 0 warnings. (took 5s.186ms)

 

 

JHERI
JHERIAuthor
Associate III
September 18, 2023

from ../../CM7/../../CM7/TouchGFX/gui/include/gui/output_zone1_screen/OUTPUT_ZONE1View.hpp:4,

from C:/TouchGFXProjects/Train/CM7/TouchGFX/gui/src/output_zone1_screen/OUTPUT_ZONE1View.cpp:1:

../../CM7/../../CM7/TouchGFX/gui/include/gui/containers/Panel.hpp:16:18: error: cannot declare member function 'PanelBase::buttonCallbackHandler' within 'Panel'

16 | virtual void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src);

| ^~~~~~~~~

In file included from ../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/output_zone1_screen/OUTPUT_ZONE1ViewBase.hpp:12,

from ../../CM7/../../CM7/TouchGFX/gui/include/gui/output_zone1_screen/OUTPUT_ZONE1View.hpp:4,

from C:/TouchGFXProjects/Train/CM7/TouchGFX/gui/src/output_zone1_screen/OUTPUT_ZONE1Presenter.cpp:1:

../../CM7/../../CM7/TouchGFX/gui/include/gui/containers/Panel.hpp:16:18: error: cannot declare member function 'PanelBase::buttonCallbackHandler' within 'Panel'

16 | virtual void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src);

| ^~~~~~~~~

In file included from C:/TouchGFXProjects/Train/CM7/TouchGFX/gui/src/containers/Panel.cpp:1:

../../CM7/../../CM7/TouchGFX/gui/include/gui/containers/Panel.hpp:16:18: error: cannot declare member function 'PanelBase::buttonCallbackHandler' within 'Panel'

16 | virtual void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src);

| ^~~~~~~~~

make[1]: *** [Application/User/gui/subdir.mk:47: Application/User/gui/OUTPUT_ZONE1View.o] Error 1

make[1]: *** Waiting for unfinished jobs....

make[1]: *** [Application/User/gui/subdir.mk:49: Application/User/gui/Panel.o] Error 1

make[1]: *** [Application/User/gui/subdir.mk:45: Application/User/gui/OUTPUT_ZONE1Presenter.o] Error 1

In file included from ../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/output_zone1_screen/OUTPUT_ZONE1ViewBase.hpp:12,

from C:/TouchGFXProjects/Train/CM7/TouchGFX/generated/gui_generated/src/output_zone1_screen/OUTPUT_ZONE1ViewBase.cpp:4:

../../CM7/../../CM7/TouchGFX/gui/include/gui/containers/Panel.hpp:16:18: error: cannot declare member function 'PanelBase::buttonCallbackHandler' within 'Panel'

16 | virtual void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src);

| ^~~~~~~~~

In file included from ../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/output_zone1_screen/OUTPUT_ZONE1ViewBase.hpp:12,

from ../../CM7/../../CM7/TouchGFX/gui/include/gui/output_zone1_screen/OUTPUT_ZONE1View.hpp:4,

from ../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:15,

from ../../CM7/../../CM7/TouchGFX/gui/include/gui/common/FrontendHeap.hpp:4,

from C:/TouchGFXProjects/Train/CM7/TouchGFX/generated/gui_generated/src/common/FrontendApplicationBase.cpp:6:

../../CM7/../../CM7/TouchGFX/gui/include/gui/containers/Panel.hpp:16:18: error: cannot declare member function 'PanelBase::buttonCallbackHandler' within 'Panel'

16 | virtual void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src);

| ^~~~~~~~~

make[1]: *** [Application/User/generated/subdir.mk:163: Application/User/generated/OUTPUT_ZONE1ViewBase.o] Error 1

make[1]: *** [Application/User/generated/subdir.mk:145: Application/User/generated/FrontendApplicationBase.o] Error 1

In file included from ../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/output_zone1_screen/OUTPUT_ZONE1ViewBase.hpp:12,

from ../../CM7/../../CM7/TouchGFX/gui/include/gui/output_zone1_screen/OUTPUT_ZONE1View.hpp:4,

from ../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:15,

from ../../CM7/../../CM7/TouchGFX/gui/include/gui/common/FrontendHeap.hpp:4,

from C:/TouchGFXProjects/Train/CM7/TouchGFX/target/generated/TouchGFXConfiguration.cpp:21:

../../CM7/../../CM7/TouchGFX/gui/include/gui/containers/Panel.hpp:16:18: error: cannot declare member function 'PanelBase::buttonCallbackHandler' within 'Panel'

16 | virtual void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src);

| ^~~~~~~~~

In file included from ../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/output_zone1_screen/OUTPUT_ZONE1ViewBase.hpp:12,

from ../../CM7/../../CM7/TouchGFX/gui/include/gui/output_zone1_screen/OUTPUT_ZONE1View.hpp:4,

from ../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:15,

from ../../CM7/../../CM7/TouchGFX/gui/include/gui/common/FrontendHeap.hpp:4,

from C:/TouchGFXProjects/Train/CM7/TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp:21:

../../CM7/../../CM7/TouchGFX/gui/include/gui/containers/Panel.hpp:16:18: error: cannot declare member function 'PanelBase::buttonCallbackHandler' within 'Panel'

16 | virtual void PanelBase::buttonCallbackHandler(const touchgfx::AbstractButton& src);

| ^~~~~~~~~

make[1]: *** [Application/User/TouchGFX/target/generated/subdir.mk:44: Application/User/TouchGFX/target/generated/TouchGFXConfiguration.o] Error 1

make[1]: *** [Application/User/TouchGFX/target/generated/subdir.mk:46: Application/User/TouchGFX/target/generated/TouchGFXGeneratedHAL.o] Error 1

make: *** [makefile:93: all] Error 2

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

 

15:56:26 Build Failed. 16 errors, 0 warnings. (took 4s.17ms)

 

 

MM..1
Chief III
September 18, 2023

You know what is C++ ?

JHERI
JHERIAuthor
Associate III
September 18, 2023

I normally program in C

I understand classes and object orientated code,

just have no idea how to used touchgrfx ??? there is so little basic easy to understand examples

JHERI
JHERIAuthor
Associate III
September 18, 2023

JHERI_0-1695050140169.png

JHERI_1-1695050180777.pngJHERI_2-1695050189284.png

JHERI_3-1695050243012.pngJHERI_4-1695050270404.png

 

 

 

MM..1
Chief III
September 18, 2023

Then why you place PanelBase into other class and ask why compiler say error.?

I agree learn TGFX is not easy. My tip is half year.

I disagree, examples is in designer , but in new version is more complicated to open.

 

JHERI
JHERIAuthor
Associate III
September 18, 2023

I agree learn TGFX is not easy. My tip is half year.

but there needs to be good documentation and examples examples examples

JHERI
JHERIAuthor
Associate III
September 18, 2023

JHERI_0-1695051090665.png

this is the code touchGfx generated ???

Graduate II
September 19, 2023

Hello.

You dont need to make buttonCallbackHandler by yourself to panel-class. Just add ev and JIMJIM- functions to panel class. Tgfx generates calls to those automatically to the panelbase- class. You found empty declations in panelbase.hpp file for those functions, just copy/modify those to the panel.hpp/.cpp

There is also example about simple button operation. Open tgfx designer and select examples on the left menu. I guess these examples are good way to learn how to use different widgets. You can select simulator as  target board if you just want to test different examples.

Hope you get forward, and ask more if needed.

Br J.T

MM..1
Chief III
September 18, 2023

I mean here is all or 80% what you need TouchGFX Documentation | TouchGFX Documentation

Richard Lowe
Senior II
September 19, 2023

I disagree with the 80%. The majority of the documentation is auto-generated. Look at their API documentation and see if you can figure out how to use a particular class from it. Some yes, most no. For example, how do you use the Gradient class? 

JHERI
JHERIAuthor
Associate III
September 19, 2023

I simply think Touchgfx is great program and design tool, but very little time and effort has been giving to good structured training and examples. You need an online training cource to teach you and show you the way with every aspect of touchgfx, you can't be bumming arround for three days trying to get a button click event in a custom container!!

Its clear the program has great potential, shame about the lack of examples and guides, there needs to be 100s and 100s of Easy Step By Step examples, clearly showing every stage, so the engineer can understand and get it!!

Thats if you have not launched the PC first out of anger from the compiler errors that make no sense

JHERI
JHERIAuthor
Associate III
September 19, 2023

this type of page is so unhelpful ???

There should be 5 or 6 examples at the bottom showing how the click listner works ????/

the pages really mean nothing to me, very dificult to understand and no help at all >???

JHERI_0-1695111058796.pngJHERI_1-1695111121730.png

????????????????????????????????????????????????????????