cancel
Showing results for 
Search instead for 
Did you mean: 

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

JHERI
Senior

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

 

 

 

 

 

14 REPLIES 14
JHERI
Senior

 

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
Senior

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
Senior

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 II

You know what is C++ ?

JHERI
Senior

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
Senior

JHERI_0-1695050140169.png

JHERI_1-1695050180777.pngJHERI_2-1695050189284.png

JHERI_3-1695050243012.pngJHERI_4-1695050270404.png

 

 

 

MM..1
Chief II

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
Senior

JHERI_0-1695051090665.png

this is the code touchGfx generated ???

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

but there needs to be good documentation and examples examples examples