TouchGFX Custom Widgets & Containers
TouchGFX Custom Widgets & Containers
Yes, you can use TouchGFX with SPI driven displays but TouchGFX does not really "support" a display interface, it needs specific methods to be
1 Does TouchGFX also supports SPI driven displays ? Link
implemented, then it is up to the user to provide the way to refresh the screen, it could even be using some GPIOs.
If Touchgfx applications are written in C++, is there plans to have ST HAL
2 For now there is no plan to move HAL lib to C++
libraries ported to C++ also ?
3 The 32F769IDISCO is NRND when you try to choose it in CubeMX. Why? Only because of the mounter display that is no more available, the DISC1 board that replaces it does not have a display mounted
Is there a slide about the pro and cons of all of those solutions ? MicroEJ,
4 No, we only focus on the ST TouchGFX solution in ths workshop.
TouchGFX, etc.
5 Hello, who are the partners list in France ? Not yet see link Link
6 Is TouchGFX Designer running on Linux? Not in our short/mid term roadmap yet. But as we see more requests, we may raise its priority.
The hard part of the AT creation is the Board Specific Part, (i.e. specific drivers for your chosen devices), the new touchGFX documentation has sections
Is it easily possible to develop an AT for a custom designed board/display
7 to help you throughout the process. Regarding the AT creation itself (i.e. a base template for Company wide diffusion) a specific article is available, see Link
combination ?
link
So you have to decide yourself which sizes or characters of a font you need.
When selecting a specific font you will get a standard size, and this size can be customized, and then be reused for other text boxes which needs the
8 Couldn't that we automated in the Designer (which normally knows which
same settings. So when you have defined your parameters for each text box, it is easier.
sizes are actually used) ?
Yes, in TouchGFX you will find different containers like "scrollable container", "scrolls list", "Scroll layout", Scroll wheel. Depending on your needs, these
9 Can we use containers for scrolling texts?
can be used.
There is a way (tool or calculation in a application notes) to approximate
10 the memory resources (Flash/RAM ) needs according to the number of No, this feature is not yet integrated in the tool
screens ?
So I have a question. I developed 2 project with touchGFX and F746. I need For updating internal memory you can use USB DFU protocol. But it cannot be used for for updating external QSPI. For that it is needed to develop your
11
to update firmware (so also image in QSPI FLASH) using USB stick own bootloader running on STM32.
During the workshop we'll discuss about how we can integrate C++
12 Not in details but mixing C and C++ code is part of the labs
functions and Free Rtos tasks to communicate with the hardware?
For displays ST do not officially recommend specific ones because the availability of a given display cannot be guaranteed by ST.
Seems like most readily available MIPI-DSI displays are higher resolution
13 Tthat is why, for example the F769-DISCO board is now NRND and replaced by the F769-DISC1 that has no screen, only a connector For selecting the Link
(smartphone resolutions). Can ST recommend some compatible displays ?
display, there is a small hardware selection guide for GUI products in the new documentation, see link
14 Can the CubeMonitor be compared to the Segger SystemView tool ? CubeMonitor and Segger tool look similar tool but I have no detailed comparison, please see link Link
What is the difference between STM32 cube programmer and STLink utility
15 STLink should be deprecated in the future and replaced by Cube Programmer
?
What is the difference between [Link] and .part file is generated by CubeMX TouchGFX Generator, becomes useless once .touchgfx is created and TouchGFX plugin settings do not change
16
[Link] ? anymore.
17 Is c++ mandatory or will C99 do the job as well ? C++ is only mandatory for the TouchGFX framework (layout + logic) but the underlying code can still be C
18 Can touchgfx control multiple displays ?
19 What you need an excel sheet? It is convenient when having several languages support to share only this Excel file to fill each translation without installing the Designer on every PCs
20 Can text areas be updated at runtime ? See the following documentation link Link
22 Which widget do I use to diplay variables like temperature? Is it text area? Can be text area, image progress widget (see Lab part 3), custom gauge widget, etc.
Can you explain the interaction between the my old c code and c++ in
23 These mechanisms are included in the Lab source code and are largely covered across dedicated websites on mixing C and C++
touchGFX ?
There is a TouchGFX article on framebuffer strategy and also on hardware selection having display in mind:
24 Do i need a ext. RAM when i use a 480x272 LCD ? Link
[Link]
Please make sure to check AN4861: LCD-TFT display controller (LTDC) on STM32 MCUs, there is a dedicated section for framebuffer size and location
called "Framebuffer memory size requirements and location". Based on your display resolution (definition) and the required color depth, you may fit
inside the internal SRAM of STM32 (even with two frame buffers for double-buffering). In that case no external RAM memory is needed for the
framebuffer, which might be a big advantage. STM32H7A3/H7B3/H7B0 devices with high amount of the internal RAM are especially fitting applications
with GFX, but the job may be done even with the entry-level STM32G0 (with partial frame buffer).
Link to AN4861: [Link]
This picture will give you an overview, what can be done with the internal RAM in case of STM32H7A3/H7B3/H7B0:
25 How do I determine what memory is used for frame buffer, images etc...?
"Is there support for overlaying touchfgx views with external live video
26 Link
streams ? Yes using Dynamic Bitmap see link
Not without an additional component that will convert RGB signal to LVDS (e.g. [Link] no STM32 MCU support
About Display Interfaces: Especially bigger Display like 10" do not have RGB
27 natively LVDS.
Interface anymore but LVDS. Is there an easy way to connect them?
One example of an STM32 running a 10.1" display, is the EDT Smart embedded module. but they also use a bridge fra RGB to LVDS.
Either setting the exact address in the CubeMX generator or using PRAGMA calls in the code
28 Where it will be set the location (int/ext) of the frame buffer?
The table for the FB will be assigned a label at compilation time and is then located using the scatter file (shown during the lab).
Where are the files representing the low level BSP like framebuffer low
29 This is part of the TouchGFX HAL located in the "target" sub-folder of the TouchGFX folder, see link Link
level functions like (re-)draw parts of the display contents?
The FreeRTOS training as gone to Mooc now see link
30 Where to learn more about FreeRTOS Link
Education site : [Link]
Another HW question: quite a few displays use DSI interface. usually they
31 are 4-lanes. Does any STM32 part support 4-lane DSI? (I know that some of As of today the ST MCUs that support DSI support only 2 lanes, however display supporting 4 lines can usually be configured in 2 lanes.
the displays support 2-lane comms)
Yes there are some examples available in the Cube Programmer installation folder from which you can implementing you own (in folder : C:\Program
If I can make it: Any one have hints on creating .stldr files? an app note or
32 Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader)
anything?
Moreover there is a video on the subject [Link]
33 CubeMX states that STM32H7A3 is in 'preview' - how is availability? Product is in volume production right now, indeed not all packages are already available see link Link
Does touchgfx requires chrome-art or internal display controller or could
Sure, TouchGFX library can even run on a G0 MCU, without ChromArt or any other type of acceleration, connected through SPI to the display for
34 also work with external controller such as SPI displays? So on more little
example (so without LTDC)
MCU like F0xx ?
And can it run without external SDRAM on eg an F429 if you only need a
Here is a small explaination of the partial framebuffer (see link) it affects the performances but you can still do some nice graphics with the G0 as long
35 40kb frambuffer ? (I seem to remember that I could not do this in cubemx Link
as you do not do full screen transitions
but it was 1 year ago , it required to have an sdram)
36 Is it possible to add widgets at runtime? No, widgets are defined at compilation time to have the best control as possible on the memory usage (both FLASH and RAM)
Language could be changed at runtime (in a set of supported translation
37 Yes multi-language change at runtime is supported, see link Link
table) or each one require to be compiled in separate binaries?
If you mean to display a video, you can use the animated image widget or MJPEG movie, an example of movie player is provided in the Cube Firmware
38 Do you plan to have video widget? C:\STM32Cube\Repository\STM32Cube_FW_H7_V1.7.0\Projects\STM32H7B3I-DK\Demonstrations\VideoPlayer, but no dedicated widget for the
moment
39 No plot/graph widget? A graph widget should come, in the meantime the open-repo is still working there is a graph widget in link Link
It is not recommended as it would imply rotating the framebuffer at each transmission to the display, one possibility would be to create 2 versions of
40 Can you change the display orientation @ runtime?
each screen (landscape and portrait mode) and change screen when rotation is signaled.
Can you explain the mixin 'ClickListener' - Does that mean that for example Yes exactly, enabling this mixin on an image will create dedicated functions in the code that will be called when the image is clicked, then up to you to
41
an image can be turned into a button ? implement the behavior you want in it
42 Ah, okay - so it's not possible (yet) to attach an interaction to a mixin? No, the Designer does not yet open all the possibilities of the framework, you still need to update the code directly at some point
Are the sources of the engine available on request (if you run into some Some of the TouchGFX framework is delivered as closed-source, to protect some of the algorithms making TouchGFX performing so well. If you find a
43 weird crash inside the library, even if it is because you pass a wrong bug in this part, we take it very seriously and we often solve it right away. Our experience is that our customers is generally not experiencing bugs in
parameter it is useful to have sources to see where you are going wrong) this part.
Can you get the source code of some widgets that are used in the
Sure, all widgets included in the Designer are delivered in source code that can be found in the TouchGFX Designer installation folder here :
44 designer? Maybe some custom changes are wanted and then you don't Link
C:\TouchGFX\4.13.0\touchgfx\framework\source\touchgfx\widgets see also : see link
need to make the widget from scratch.
This presentation assumes that you will create a certain fixed gui with
touchgfx designer. How about making the gui at runtime programmatically
? Eg in one project I have upython running on top of C code where I allow
gui elements to be created via python scripts, the scripts are created by our
client so i have no idea what he will make with it, there is no "fixed" gui. I
At runtime only one screen is active at a time allowing to save some RAM by deallocating other screens. At code generation step the Designer reserve
used stemwin for that project, is this something that can be easily realised
45 some RAM for the screen with the highest footprint, this allows to reduce the amount of needed memory but also prevent from creating (and thus
in touchgfx as well ? I assume this is basically what touchgfx is helping you
allocating) widgets at runtime as suggested here. The purpose is no to avoid non-deterministic dynamic memory allocation.
with but it is not needed, correct ? (touchgfx designer i mean ).
But then the GUI is fixed at some point, not generated at runtime, right ?
It is a python script that can be changed at any time that eg decides to put
some text at coordinates X, Y then 10 seconds later it decides to do
something else.
I also have a question about 'responsive' design where the GUI is highly
data driver, in real-world applications I often have many parameters (100s)
that needs to have an GUI for access and modification, some have a set lift
46 of allowed ooptions, some need user input, some must be context aware This use-case is not covered currently for the reasons mentioned above
which shows options depending on other settings. IN this case its
impossible to design a 'fixed' GUI it needs to be data driven and defined
elsewehere (for example trough a PHP, XML,Database, Text file)
Is there any roadmap available for tGFX? i.e. what can we expect to see in
47 Not a public one for the moment
the future ?
48 Is the TouchGFX releases tied to the CubeMX release cycle? Not anymore now that it comes as a Cube Expansion Pack
Not a question but since you were a bit surprised about possibility for
"dynamic" behavior in stemwin you can look at the documentation in :
[Link]
49 -> Change request
This shows functions like GUI_ExecDialogBox or GUI_DispString to create a
dialog box or text "on the fly"/"nonfixed". So this is the kind of stuff that is
sadly not possible with touchgfx as we concluded.
In case of board definition in rgb666 or L8-rgb565 does the color selector is No, the same set of colors will be used even for RGB666 format, the user need to take care (-> Change request), for L8 format it is only relevant for
51
adapted to the available color range or still propose to set 24b colors ? input images, not for computed graphics colors
52 The application name (under Config). it cannot be changed - why is that? It is strongly linked to the capacity of changing project name in chosen IDE (-> Change request)
"Please change regional setting in control pannel to English" when installing
53 This constraint is linked to Excel date format management (-> Change request)
TouchGFX Designer
How do you distinguish between Resources and Single use texts in the
54 Only the naming differentiate them in this file
[Link] file
55 Is it possible to create our own transitions? Change request
What about the custom widgets? it's possible to add them to TouchGFX
56 Designer or we need to modify the cpp code after and add them there Change request
manually?
Let's say i want to the animated logo to go from ani01 to ani10, then back
to ani01, reusing the same image steps in reverse order to not duplicate This is the settings for the animated image widget. For now it not possible to go from ani01--> ani10 -->ani01.... But you can reverse and loop the
57
the images in memory is it doable? Isn't it more like a cycle like ani01- animation. So only by modifying the code.
>ani10->ani01 so we could mimick the full rotation..
Sure, that is why we provide so many examples on our boards, but we cannot cover all the existing displays and external memories but these examples
are now on the TouchGFX Designer side in Application Templates and of course in the Cube Firmware package for other peripherals for the story the
83 It is the hardest part for newbies to integrate BSP
BSP part of ST devkits within the CubeMX was completely hard-coded in the tool so not configurable, which was not viable, integrate BSP as CubeMX
plugins will allow a better maintenance and will allow to configure them, but this is a huge work, still under discussion,
84 Would be possibile to have some sample of the CanvasWidgetRenderer ? There is an article on this widget in the documentation, see link Link