Q: What is a Custom Extension

A: A Custom Extension is a possibility to enhance the GSE with a custom-made piece of functionality. this could be a layouter, behaviour, command or widget. the advantage when using Custom Extensions is that the designer can use them directly within the GSE and play around with them without any programming knowledge. the programmer just fills the important parts of the generated shell with custom code for visual representation and behaviour.
The license limits for Custom Extensions only apply to the usability within the GSE. Guiliani can, of course, be extended with new customized functionality with no restrictions.

Q: Run Guiliani on Baremetal

Could you help us on how to start running a Guiliani application on a system without RTOS?

A: You are currently using an evaluation version which is available for Windows and Linux. To be able to use Guiliani on other platforms (OS/HW) it has to be ported to the desired platform.

Normally you will need to recompile for the target HW (new CPU means new compile). For systems without OS, you will need in addition some bindings to address the target HW. For both porting steps, you will need the complete source code of Guiliani which is not part of the SDK.

The port can be part of a license contract or it is possible to buy a source code license which will enable you to port on your own. For licensing information and pricing please contact our sales.

Q: Sample Guiliani-Application

We got the Guiliani evaluation kit and we are able to install it and use it. We feel that the flow of the existing tutorial application is very difficult to understand.

  1. Can you provide us a sample GUI application like a screen with controls on it?
  2. We also need information on how to automate UI using Guiliani library.

A: For information on input-automation please look at the Guiliani Documentation. the class which you will need to use is CGUIPlaybackInput.

Creation of a simple GUI application can be done in two different ways: The first approach is using Guiliani directly and creating the dialogs with the controls using coding. This is shown with the GuilianiTutorial (see below for concrete examples). The second approach is using the GSE and using the tool to puzzle the dialogs together. As a result, a set of XML files will be exported which later will be used by the Streamruntime app (your app) to load and present the dialogs. The app logic can be added by you within the Streamruntime app which is part of the GSE visual studio project (as source). Please have a look at Link

GuilianiTutorial: You can find within the file Tutorial01.cpp a method which is responsible creating a screen of controls. This is done inside the constructor. Have a look at the orange comments. The Tutorial01 and the other Tutorials itself are created and called on a mouse click from TutorialMain.cpp (Method CTutorialSelector::DoClick).

 1 CTutorial01::CTutorial01(
 2 CGUICompositeObject *const pParent,
 3 const eC_Value &vX, const eC_Value &vY,
 4 const eC_Value &vWidth, const eC_Value &vHeight,
 5 const ObjectHandle_t &eID)
 6 :
 7 CGUICompositeObject(pParent, CGUIRect(CGUIPoint(vX, vY), vWidth, vHeight), eID)
 8 {
 9   // Create an image control
10   m_pImage = new CGUIImage( this, vLogoX, vLogoY, IMG_GUILIANI_LOGO); // An image is placed at the given coordinates
11   // Create a ProgressBar control
12   m_pProgressBar = new CGUIProgressBar(
13       this,                               // Pointer to parent object
14       vProgBarX, vProgBarY,   // X/Y Position
15       vProgBarW, vProgBarH,    // Width, height
16       IMG_BAR1,       // Image for ProgressBar Background
17       IMG_BAR2 );     // Image which is used for "filling up" the bar
18   m_pProgressBar->SetStepSize( 10);
19   m_pProgressBar->SetFullRangeSize(eC_FromInt(180));
21   // Create a TextField
22   m_pText = new CGUIBaseTextField( this, vTut1TxtFieldX, vTut1TxtFieldY, vTut1TxtFieldW, vTut1TxtFieldH, "Please click the button!");
23   m_pText->GetLabel()->SetAligned( CGUIText::V_CENTERED, CGUIText::H_CENTERED);
25   // Create a button
26   m_pButton = new CGUIButton( this, vTut1BtnX, vTut1BtnY, vTut1BtnW, vTut1BtnH, "Click me!", NULL);
27 }

Q: How do I achieve rounded corners for rectangles

I am trying to create a custom icon button. I am trying to achieve the following:

  1. Rounded corners
  2. On clicking, the icon has to be shifted and on button release, it should be re-shifted to the original position.

Reference UI


Test UI


A: This is very easy! Normally we use buttons as complete images using the image file format png. Using png’s enables you to have transparencies in the images and therefore it’s easy to have rounded corners.

The shifting of the images is done using separate images for pressed and not pressed state. If you do not want this approach you can derive from one of our button classes and override the DoDraw method and use dependent on the state different drawing code. It’s even possible to write an own behavior which implements the requested behavior and to use it you just have to add the behavior to the buttons which should show this “behavior”. They are many further different approaches which can be used. The easiest is using the two different images with transparencies. The downside of transparencies is, they are relatively slow to draw and not available on all target hardware (depending on graphics library).

Q2: We are deriving the icon button class. Inside the DoDraw method

  1. I am drawing a rectangle with a required background color and drawing an icon with a required position inside that rectangle.
  2. Inside the click event I am able to change the icon.

So, can you provide us some documentation what CGUIIconButton::DoDraw does?

A2: Just use different icons for the clicked (pressed) state. You can use

1 pkIconButton->SetIconImages(
7 );

to define the image IDs for the different button states. If the icon is positioned differently within the image of the icon itself you will get the desired effect. For example, icon standard looks like

1 ###################
2 #                 #
3 #  III            #
4 #  III            #
5 #                 #
6 # #################

and icon pressed looks like

1 ###################
2 #                 #
3 #   III           #
4 #   III           #
5 #                 #
6 # #################

Where # are the image borders and I is the space for the icon. Only the icon pixels should be opaque. The other pixel should be fully transparent. To help you to understand how this works in DoDraw I will list the original source code of this method:

 1 eC_Bool CGUIIconButton::DoDraw()
 2 {
 3     CGUIButton::DoDraw();
 4     // Icon drawing
 5     ImageResource_t eIconImage = DUMMY_IMAGE;
 6     if (IsPressed())
 7     {
 8         eIconImage = m_eIconPressed;
 9     }
10     else if (IsHighlighted())
11     {
12         eIconImage = m_eIconHighlighted;
13     }
14     else if (IsGrayedOut())
15     {
16         eIconImage = m_eIconGrayedOut;
17     }
18     else if (IsFocussed())
19     {
20         eIconImage = m_eIconFocussed;
21     }
22     else
23     {
24         eIconImage = m_eIconNormal;
25     }
26     if (eIconImage != DUMMY_IMAGE)
27     {
28          GETGFX.BlitImgExt(eIconImage, GetAbsXPos()+m_vIconPosX, GetAbsYPos()+m_vIconPosY,
29             eC_FromInt(GETGFX.GetImgWidth(eIconImage)),
30             eC_FromInt(GETGFX.GetImgHeight(eIconImage)),
31             false,
32             m_ubIconAlpha);
33     }
34     return true;
35 }

Q: Graphic controller that supports only 4 bits per pixel

Our software will have to interface with a touchscreen via a graphic controller that supports only 4 bits per pixel and 8 bpp. Could there be any issue for Guiliani to support 8 bpp or 4 bpp?

A: To be able to decide if Guiliani supports your chosen hardware we need more information about the planned hardware such like:

  • Available RAM and Bandwidth (speed)
  • Available FLASH and Bandwidth (speed)
  • Graphics-Resolution and Color depth (as you have already mentioned).
  • Used graphics library or HW accelerator (if existent), display controller
  • CPU and Frequency
  • OS if available

Q: CGLImage linker issue

I was trying to use CGLImage for drawing an icon, but it seems that I couldn’t link the code as the definition for CGLImage constructor is missing. Can you please tell me where I can find the definition, in which library file is the definition included.

A: There is no CGLImage. Guiliani has a CGUIImage class. If you want to draw an icon directly you can also realize it using GETGFX.BlitImg(m_eImgHdlTopLeft, GetAbsXPos(), GetAbsYPos()); where eImgHdlTopLeft is the ID of the icon.

Q: Transitions

I need some help in screen transition. The problem is briefed below.

  1. I have a ScreenContainer derived from CGUI which gets added to Screen
  2. I am adding an HomeScreen (resolution 480 x 272) object derived from CGUICompositeObject to the ScreenContainer
  3. HomeScreen has a “Tools” button. When the “Tools" button is clicked it should show a new screen GridViewScreen ( resolution 480 x 272).

I am able to do the above using an AddObject() call on ScreenContainer, but the issue is that I am not able to get back to the HomeScreen when pressing the “Back” button on GridViewScreen. I need some help on this. Please see the image below. Red flow is not working.


A: You are working into the right direction. In principle, the shown GUI is just a hierarchy of objects. All objects which are currently within the hierarchy will get drawn. There are only three exceptions:

  1. An object is marked invisible. That means it and all of its children (if the object is a composite object) will be invisible.
  2. An object if covered behind a fully opaque object. That means it is drawn but another object is drawn afterward on top of it.
  3. The draw method does not draw anything or the object is fully transparent or outside the bounds of the parent object and therefore clipped away.

Therefore you can either remove the GridViewScreen by deleting it, hiding it (via SetInvisible(true)) or removing it from the view hierarchy and store the GridViewScreen pointer for later use (compositeobject->RemoveObject(obj)).

Remember it is possible to stream the dialogs into a file and load them later via CGUILoadDialogCmd which also can take care for what to do with the previous dialog. You can also write your own commands to create, destroy, show or hide dialogs. It is then possible to connect the cmd to a button, for example (SetCommand(CGUICommandPtr pCommand)) and you do not have the need to derive objects to react on DoClick.

You can also manipulate the order of the hierarchy to control which object is drawn on top of another using void DrawOnTop(CGUIObject* pObject) or void DrawOnTopOf( CGUIObject*const pObject, CGUIObject*const pDrawOnTopOf).

Q: Pixel Processing

Does Guiliani Supports Pixel Processing?

A: Guiliani itself does not offer this kind of functionality. It’s usually the responsibility of a graphics library. Dependent on the platform you are using it might be available. If you will use for example eGML from TES it’s part of the library.

If your platform is not supporting pixel processing we can provide you with it after getting a specification what you need.

Q: Is the STM32F429 supported

There is a nice cheap development board including display available from ST called STM32F429 Discovery. Is it possible to use Guiliani to develop HMIs?

A: We are currently investigating for which development environment will be best for our BSP.

  • CoIDE
  • IAR
  • Keil
  • Eclipse with GCC

Feedback would help us to decide which IDE might be the best.


Q: GSE sometimes does not exit properly.

A: This could happen on various Linux-Versions, especially when using VirtualBox or VMWare. Possibly your sound-card has crashed. You can deactivate the sound-card and/or update to the latest version of virtualizing software/operating system and try again.



Q: Ram start address in linker script for Renesas RZ/A

I've started to look into Guiliani 2.0 SDK for RZ/A and I noticed maybe some bug in linker script RZA1H_GCC_RAM_APP.ld for SR_ShowRoom project. It is: RAM_START = 0x20024000; Shouldn't it be: RAM_START = 0x20040000; ? As it is pointed from boot loader.

A: in the file BSP\RZ_A1H_QSPI_LOADER\src\qspi_change_config.c in line 390 you can see the call into the application:

1 (*applicationEntry)();

At the beginning of qspiReconfigure(void) in line 208 applicationEntry is defined as:

1 fPtr applicationEntry = (fPtr) DEF_USER_PROGRAM_SRC;

In BSP\RZ_A1H_QSPI_LOADER\inc\ line 55 you can see the definition of DEF_USER_PROGRAM_SRC:


Finally APPLICATION_VECTOR_TABLE is defined as:

1 #define APPLICATION_VECTOR_TABLE 0x20024000

So the address 0x20024000 will be called by the boot loader if it is compiled using the configuration Debug_APPLICATION_IN_RAM, which matches RAM_START in the RZA1H_GCC_RAM_APP.ld.

Q: <new> and bad_alloc() warnings after compiling

SR_ShowRoom is compiling without errors and I can start debugging but I have warnings "unresolve inclusion: <new" and "function bad_alloc() could not be resolved" in StreamRuntime_FreeRTOS.cpp after compiling. Shouldn't I add path "${TCINSTALL}\arm-none-eabi\include\c++\5.2-GNUARM-NONE_v16.01" to the compiler options? What to do to remove warning "function bad_alloc() could not be resolved"?

A:the error is marked as Semantic errors, meaning e2Studio's indexer thinks there might be an error. I added these paths

  • "${TCINSTALL}\arm-none-eabi\include\c++\5.2-GNUARM-NONE_v16.01"
  • "${TCINSTALL}/arm-none-eabi/include/"
  • "${TCINSTALL}/lib/gcc/arm-none-eabi/5.2-GNUARM-NONE_v16.01/include"

to the SR_ShowRoom project properties using "C/C++ General\Paths and symbols" which does not affect the compiler parameters.

After that, the semantic errors disappeared.

Q: To run in RAM

We are developing an application with RZ and Guiliani. Our PCB is very similar to the Renesas Demo Board. After adapting the LCD ports, and debugging the driver for our Touch Panel, everything works correctly. We have used GSE to create our own resources, and after downloading, the system works well. By default, the Guiliani ShowRoom sample, run from the QSPI space, for this reason, we detect some slower behaviour than we expected to. We also can run in Debug session into RAM, using the RZA1H_GCC_RAM_APP.ld linker script.

What we need is to change the boot loader, linker script and any else necessary, in order to run in RAM from a copy of the code, made from the QSPI space in the Boot process, that means, in stand-alone start-up way.

Could you help us please, about what to make for getting success.

A: In the linker script there is a section .fast_code_section. Everything that is placed in this section will be run out of RAM.

Q2: The problem that we detect should be because the malloc() function does not use the .heap_section range signaled by the linker script file, and is trying to allocate memory in the bss range. Because of the model heap3 of FreeRtos, give the malloc() responsibility to the compiler functions, how can we order to the gcc compiler that it uses the .heap_section range for memory management functions?

A2: Heap_3.c maps pvPortMalloc to malloc().

malloc() is implemented in project SR_Showroom in function _sbrk() in module syscalls.c

Please note that syscalls.c MUST be linked with the application and NOT with the BSP project. If syscalls.c is linked with the BSP project, the wrong implementation of _sbrk() is linked which is part of the gcc C run-time library, This “wrong” implementation of _sbrk() locates the heap into the bss section.

The _sbrk() of syscalls.c locates the heap here

1 #define NL_HEAP_START (&_nl_heap_start)
2 #define NL_HEAP_END (&_nl_heap_end)

These above symbols are located in the linker command files GCC-QSPI-APP.ld or GCC-RAM-APP.ld:

 1 .heap_section (NOLOAD) :
 2 {
 3 . = ALIGN(0x8);
 4 end = .;
 5 PROVIDE(end = .);
 6 _nl_heap_start = .;
 7 PROVIDE(_nl_heap_start = .); /* referenced by syscalls.c _sbrk() for heap management */
 9 . = ABSOLUTE(RAM_END - 4);
10 _nl_heap_end = .;
11 PROVIDE(_nl_heap_end = .); /* referenced by syscalls.c _sbrk() for heap management */
12 } > RAM

You can, of course, use another implementation of _sbrk() and map the heap into the bss section.