cancel
Showing results for 
Search instead for 
Did you mean: 

Shape-Widgets in TouchGFX?

DAmig
Associate II

The knowledge base text in widget->Circle shows 4 widgets (Box, Box with Border, Line and Circle) on the SHAPES, and the text indicates:

"The Circle is located under Shapes in the TouchGFX Designer."

Sorry, but, where is Shapes on the TouchGFX Designer?

15 REPLIES 15
DAmig
Associate II
Hi Martin,
It´s a little messy but let me put here the log:
Compiling simulator/main.cpp
In file included from gui/src/model/Model.cpp:1:0:
gui/include/gui/model/Model.hpp: In constructor 'Model::Model()':
gui/include/gui/model/Model.hpp:70:20: error: 'Model::modelListener' will be initialized after [-Werror=reorder]
     ModelListener* modelListener;
                    ^~~~~~~~~~~~~
gui/include/gui/model/Model.hpp:64:10: error:   'int16_t Model::hour'
[-Werror=reorder]
  int16_t hour;
          ^~~~
gui/src/model/Model.cpp:8:1: error:   when initialized here
[-Werror=reorder]
 Model::Model() : modelListener(0), hour(0), minute(0)
 ^~~~~
cc1plus.exe: all warnings being treated as errors
simulator/gcc/Makefile:211: recipe for target
'build/MINGW32_NT-6.2/gui/src/model/Model.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/model/Model.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from
generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hpp:9:0,
                 from gui/include/gui/screen1_screen/Screen1View.hpp:4,
                 from
generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:17,
                 from gui/include/gui/common/FrontendHeap.hpp:4,
                 from
touchgfx//framework/include/common/TouchGFXInit.hpp:25,
                 from simulator/main.cpp:3:
gui/include/gui/screen1_screen/Screen1Presenter.hpp:11:1: error:
expected initializer before 'class'
 class Screen1View;
 ^~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:37:33: error:
expected ')' before '&' token
     Screen1Presenter(Screen1View& v);
                                 ^
gui/include/gui/screen1_screen/Screen1Presenter.hpp:56:5: error:
'Screen1View' does not name a type
     Screen1View& view;
     ^~~~~~~~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:13:7: error: 'class
Screen1Presenter' only defines private constructors and has no friends
[-Werror=ctor-dtor-privacy]
 class Screen1Presenter : public Presenter, public ModelListener
       ^~~~~~~~~~~~~~~~
In file included from
generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hpp:9:0,
                 from gui/include/gui/screen1_screen/Screen1View.hpp:4,
                 from gui/src/screen1_screen/Screen1View.cpp:1:
gui/include/gui/screen1_screen/Screen1Presenter.hpp:11:1: error:
expected initializer before 'class'
 class Screen1View;
 ^~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:37:33: error:
expected ')' before '&' token
     Screen1Presenter(Screen1View& v);
                                 ^
gui/include/gui/screen1_screen/Screen1Presenter.hpp:56:5: error:
'Screen1View' does not name a type
     Screen1View& view;
     ^~~~~~~~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:13:7: error: 'class
Screen1Presenter' only defines private constructors and has no friends
[-Werror=ctor-dtor-privacy]
 class Screen1Presenter : public Presenter, public ModelListener
       ^~~~~~~~~~~~~~~~
In file included from
generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hpp:9:0,
                 from gui/include/gui/screen1_screen/Screen1View.hpp:4,
                 from
generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:17,
                 from gui/include/gui/common/FrontendHeap.hpp:4,
                 from
generated/gui_generated/src/common/FrontendApplicationBase.cpp:6:
gui/include/gui/screen1_screen/Screen1Presenter.hpp:11:1: error:
expected initializer before 'class'
 class Screen1View;
 ^~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:37:33: error:
expected ')' before '&' token
     Screen1Presenter(Screen1View& v);
                                 ^
gui/include/gui/screen1_screen/Screen1Presenter.hpp:56:5: error:
'Screen1View' does not name a type
     Screen1View& view;
     ^~~~~~~~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:13:7: error: 'class
Screen1Presenter' only defines private constructors and has no friends
[-Werror=ctor-dtor-privacy]
 class Screen1Presenter : public Presenter, public ModelListener
       ^~~~~~~~~~~~~~~~
In file included from
generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:17:0,
                 from gui/include/gui/common/FrontendHeap.hpp:4,
                 from
touchgfx//framework/include/common/TouchGFXInit.hpp:25,
                 from simulator/main.cpp:3:
gui/include/gui/screen1_screen/Screen1View.hpp:9:1: error: expected
initializer before 'class'
 class Screen1View : public Screen1ViewBase
 ^~~~~
cc1plus.exe: all warnings being treated as errors
In file included from gui/src/screen1_screen/Screen1View.cpp:1:0:
gui/include/gui/screen1_screen/Screen1View.hpp:9:1: error: expected
initializer before 'class'
 class Screen1View : public Screen1ViewBase
 ^~~~~
cc1plus.exe: all warnings being treated as errors
In file included from
generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:17:0,
                 from gui/include/gui/common/FrontendHeap.hpp:4,
                 from
generated/gui_generated/src/common/FrontendApplicationBase.cpp:6:
gui/include/gui/screen1_screen/Screen1View.hpp:9:1: error: expected
initializer before 'class'
 class Screen1View : public Screen1ViewBase
 ^~~~~
cc1plus.exe: all warnings being treated as errors
simulator/gcc/Makefile:211: recipe for target
'build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1View.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1View.o]
Error 1
simulator/gcc/Makefile:211: recipe for target
'build/MINGW32_NT-6.2/simulator/main.o' failed
make[2]: *** [build/MINGW32_NT-6.2/simulator/main.o] Error 1
In file included from gui/src/screen2_screen/Screen2View.cpp:1:0:
gui/include/gui/screen2_screen/Screen2View.hpp:9:1: error: expected
initializer before 'class'
 class Screen2View : public Screen2ViewBase
 ^~~~~
simulator/gcc/Makefile:211: recipe for target
'build/MINGW32_NT-6.2/generated/gui_generated/src/common/FrontendApplicationBase.o'
failed
make[2]: ***
[build/MINGW32_NT-6.2/generated/gui_generated/src/common/FrontendApplicationBase.o]
Error 1
simulator/gcc/Makefile:211: recipe for target
'build/MINGW32_NT-6.2/gui/src/screen2_screen/Screen2View.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/screen2_screen/Screen2View.o]
Error 1
In file included from
generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hpp:9:0,
                 from gui/include/gui/screen1_screen/Screen1View.hpp:4,
                 from gui/src/screen1_screen/Screen1Presenter.cpp:1:
gui/include/gui/screen1_screen/Screen1Presenter.hpp:11:1: error:
expected initializer before 'class'
 class Screen1View;
 ^~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:37:33: error:
expected ')' before '&' token
     Screen1Presenter(Screen1View& v);
                                 ^
gui/include/gui/screen1_screen/Screen1Presenter.hpp:56:5: error:
'Screen1View' does not name a type
     Screen1View& view;
     ^~~~~~~~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:13:7: error: 'class
Screen1Presenter' only defines private constructors and has no friends
[-Werror=ctor-dtor-privacy]
 class Screen1Presenter : public Presenter, public ModelListener
       ^~~~~~~~~~~~~~~~
In file included from gui/src/screen1_screen/Screen1Presenter.cpp:1:0:
gui/include/gui/screen1_screen/Screen1View.hpp:9:1: error: expected
initializer before 'class'
 class Screen1View : public Screen1ViewBase
 ^~~~~
cc1plus.exe: all warnings being treated as errors
simulator/gcc/Makefile:211: recipe for target
'build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1Presenter.o' failed
make[2]: ***
[build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1Presenter.o] Error 1
In file included from
generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hpp:9:0,
                 from
generated/gui_generated/src/screen1_screen/Screen1ViewBase.cpp:4:
gui/include/gui/screen1_screen/Screen1Presenter.hpp:11:1: error:
expected initializer before 'class'
 class Screen1View;
 ^~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:37:33: error:
expected ')' before '&' token
     Screen1Presenter(Screen1View& v);
                                 ^
gui/include/gui/screen1_screen/Screen1Presenter.hpp:56:5: error:
'Screen1View' does not name a type
     Screen1View& view;
     ^~~~~~~~~~~
gui/include/gui/screen1_screen/Screen1Presenter.hpp:13:7: error: 'class
Screen1Presenter' only defines private constructors and has no friends
[-Werror=ctor-dtor-privacy]
 class Screen1Presenter : public Presenter, public ModelListener
       ^~~~~~~~~~~~~~~~
cc1plus.exe: all warnings being treated as errors
simulator/gcc/Makefile:211: recipe for target
'build/MINGW32_NT-6.2/generated/gui_generated/src/screen1_screen/Screen1ViewBase.o'
failed
make[2]: ***
[build/MINGW32_NT-6.2/generated/gui_generated/src/screen1_screen/Screen1ViewBase.o]
Error 1
In file included from gui/src/screen2_screen/Screen2Presenter.cpp:1:0:
gui/include/gui/screen2_screen/Screen2View.hpp:9:1: error: expected
initializer before 'class'
 class Screen2View : public Screen2ViewBase
 ^~~~~
simulator/gcc/Makefile:211: recipe for target
'build/MINGW32_NT-6.2/gui/src/screen2_screen/Screen2Presenter.o' failed
make[2]: ***
[build/MINGW32_NT-6.2/gui/src/screen2_screen/Screen2Presenter.o] Error 1
simulator/gcc/Makefile:173: recipe for target 'generate_assets' failed
make[1]: *** [generate_assets] Error 2
simulator/gcc/Makefile:31: recipe for target 'all' failed
make: *** [all] Error 2
Sorry for this log.
Take a look and tell me your opinion regarding the warnings/errors.
Regards,
Daniel.
Em 31/01/2019 06:22, ST Community escreveu:
Hi Martin!
I solved the problem with the tutorial 3.
I don´t know why but if you includes on the constructor the initialization of
hour(0) and minute(0) the program crash.
The tutorial 4 is running fine (a minors details).
Now, the next step is the integration between the hardware of our board and the GUI.
Please let me know if I'm right:
The GUI is a component (very important) of the whole system.
Normally we are using the CibeMX to define the pins functions, configuration, interrupts and so on.
The pont is regarding the integration with the TouchGFX GUI.
The TouchGFX uses the paradigm Model-Presenter-Viewer, the interface with the hardware or the softwate implemented on the board (main program) or controll program is exchanging data with the Model module?
Is there an application note to guide the necessaries steps to get this integration?
We are using the Eclipse AC6 compiler (System Workbench).
One simple application is interfacing a button on the HW taht modify data or a graphic on the display, how to implement this integration?
Thanks in advance.
Regards,
Daniel.
Em 31/01/2019 06:22, ST Community escreveu:

Hi @DAmig​ (Daniel),

Check this out:

https://touchgfx.zendesk.com/hc/en-us/articles/205074561-Connecting-the-UI-to-your-system

There are examples on how to integrate your hardware with your UI in TouchGFX. The most recent ones are based on 4.9.3 (In the examples part). If you want, you can check out a webinar i held on this topic (Hardware integration). It's the middle video in this link.

https://www.touchgfx.com/resources/demo-videos/webinar-videos/

Hi Martin!
Thank you very much for your prompt answer.
I made the integration of the STM32CubeMX, TouchGFX using the SW4STM32 .
I used an STM32F429DISCOVERY board and now I'll make the same procedure using the STM32F746DISCOVERY board.
We have an application where the user send a command (on the main board) and the GUI draws widgets.
Is it possible to draw widgets of this way, dinamically?
Regards,
Daniel.
Em 08/03/2019 22:29, ST Community escreveu:

Hi @DAmig​,

Touchgfx application templates and examples do not support this (dynamic memory allocation) - TouchGFX allocates memory based on the largest view/presenter pair - The only place we use new is a placement new of a new pair into already allocated memory. You could probably set up your OS to support dynamic allocation and then create a factory to provide you with new instances of widget that you can add to the root containers of your screens - Then you would need to supply some initialization code for each widget before adding it, of course.

/Martin

Hi Martin,
According you have explained is it impossible send a 'request' to the TouchGFX to add dinamically or draw a widget (shape by example).
More specific.
I need to plot a graph X-Y, the axes Y and X must be defined on a screen of TouchGFX and only the data will be send from the main program to the Model, to the Presenter and the Viewer.
Is it correct?
Regards,
Daniel.
Em 22/03/2019 08:51, ST Community escreveu: