Difference between revisions of "Support:Frequently Asked Questions (FAQ)"

From Guiliani

(Q: To run in RAM)
Line 203: Line 203:
 
These above symbols are located in the linker command files GCC-QSPI-APP.ld or GCC-RAM-APP.ld:
 
These above symbols are located in the linker command files GCC-QSPI-APP.ld or GCC-RAM-APP.ld:
  
 +
<code>
 
.heap_section (NOLOAD) :
 
.heap_section (NOLOAD) :
 
{
 
{
Line 215: Line 216:
 
PROVIDE(_nl_heap_end = .); /* referenced by syscalls.c _sbrk() for heap management */
 
PROVIDE(_nl_heap_end = .); /* referenced by syscalls.c _sbrk() for heap management */
 
} > RAM
 
} > RAM
 +
</code>
  
 
You can of course use another implementation of _sbrk() and map the heap into the bss section.
 
You can of course use another implementation of _sbrk() and map the heap into the bss section.

Revision as of 12:51, 13 January 2017

General

Q: Run Guiliani on Baremetal

Could you help us on how to start running an GUIliani application on 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 to create a screen of controls. This is done inside the constructor. Have a look at the orange comments. The Tutorial01 and the other Tutorials itself is 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));
20 
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);
24 
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 re-shifted to the original position. Reference UI

A:


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 its 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 on pressing the “Back” button on GridViewScreen. I need some help on this. Please see the image below. Red flow is not working.

Image003.png

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 afterwards 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, hide 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 about what to do with the previous dialog. You can also write your own cmds 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.


Linux

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 sounds-card and/or update to the latest version of virtualizing software/operating system and try again.

Windows

Renesas

Q: Ram start adress 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 bootloader.

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: (*applicationEntry)();

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

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

  1. define DEF_USER_PROGRAM_SRC (APPLICATION_VECTOR_TABLE)

Finally APPLICATION_VECTOR_TABLE is defined as:

  1. define APPLICATION_VECTOR_TABLE 0x20024000

So the address 0x20024000 will be called by the bootloader 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 debuging 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 eror. 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 aslo can run in Debug sesion into RAM, using the RZA1H_GCC_RAM_APP.ld linker script.

What we need is to change the Bootloader, linker script and any else neccesary, 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 get 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 alocate memory in the bss range. Because the model heap3 of FreeRtos, give the malloc() responsability to the compiler functions, how can we order to the gcc compiler that use 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:

.heap_section (NOLOAD) : { . = ALIGN(0x8); end = .; PROVIDE(end = .); _nl_heap_start = .; PROVIDE(_nl_heap_start = .); /* referenced by syscalls.c _sbrk() for heap management */

. = ABSOLUTE(RAM_END - 4); _nl_heap_end = .; PROVIDE(_nl_heap_end = .); /* referenced by syscalls.c _sbrk() for heap management */ } > RAM

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