Middleware for the Azure RTOS GUIX Port on RZ MPUs.
Overview
The Azure RTOS GUIX Port module provides the configuration support necessary for use of GUIX on RZ MPUs. The port provides full integration with the graphics peripherals (LCDC).
Azure RTOS GUIX Port Block Diagram
Note
For information about how to use GUIX and GUIX Studio (including example code) please consult the Azure RTOS GUIX documentation.
Configuration
Build Time Configurations for gx
The following build time configurations are defined in fsp_cfg/azure/gx/gx_user.h:
Configuration
Options
Default
Description
Hardware Acceleration > DRW Engine Support
Disabled
Disabled
This setting is for the future improvement.
Internal Thread > Stack Size
Value must be greater than zero
4096
GUIX internal thread stack size in bytes. Must be greater than zero.
Internal Thread > Priority
Value must be between 0 to 31
30
Priority of the GUIX Internal Thread. The value must be between 0 to 31.
Internal Thread > Time Slice
Value must be a non-negative integer
10
Time Slice value of the GUIX Internal Thread. The value must be between 0 (TX_NO_TIME_SLICE) to 0xFFFFFFFF.
System Timer (ms)
Value must be greater than or equal to 10
20
GUIX system timer period (GX_SYSTEM_TIMER_MS). This value will be internally converted to RTOS ticks and will be rounded down to the next smallest multiple of the RTOS tick period (1000 / TX_TIMER_TICKS_PER_SECOND).
Multithread Support
Disabled
Enabled
Enabled
Must be enabled if GUIX functions are called from multiple threads. Set to Disabled when calling GUIX from only one thread to reduce system overhead.
UTF8 Support
Disabled
Enabled
Enabled
Select whether to enable or disable support for UTF8 characters.
Event Queue Size
Value must be greater than zero
48
Maximum number of events in the GUIX event queue.
Enable GX_WIDGET User Data
Enabled
Disabled
Disabled
Set to Enabled to to use the gx_widget_user_data member in the GX_WIDGET structure.
Configurations for Graphics > Azure RTOS GUIX Port (rm_guix_port)
Configuration
Options
Default
Description
Display Rotation > Screen Orientation
None
CW (90 degrees)
FLIP (180 degrees)
CCW (270 degrees)
None
Select the display orientation specified in the GUIX Studio project. The Canvas Buffer must be enabled when rotating 180 degrees (FLIP).
Display Rotation > Use Canvas Buffer
Enabled
Disabled
Disabled
When screen rotation is set to 180 degrees (FLIP), a canvas buffer must be used. The canvas buffer size will be the same as a frame buffer for the display module.
Display Rotation > Canvas Buffer Memory Section
This property must be a valid section name
bss
Specify the memory section where the GUIX Canvas Buffer will be allocated.
Name
Name must be a valid C symbol
g_rm_guix_port0
Module name.
Target Display Layer
Graphics Layer 1
Graphics Layer 2
Graphics Layer 1
Specify which graphics screen to inherit the buffer and display dimensions from.
Callback Function
Must be a valid C symbol
NULL
If a callback function is provided it will be called when Display events occur.
Hardware Configuration
No clocks or pins are directly required by this module. Please consult the submodules' documentation for their requirements.
Usage Notes
Getting Started
To get started with GUIX in an RZ project the following must be performed:
In e2 studio, open the RZ Configuration editor for your GUIX project
Select or create a thread
Add GUIX to your project in the Stacks view by clicking New Stack -> Azure RTOS -> GUIX
Ensure the configuration options for GUIX and the port layer are set as necessary for your application
Set the proporties for the LCDC module to match the timing and memory requirements of your display panel
Set the input color format in the LCDC module (Input -> Graphics Layer * -> General -> Color format)
Click the BSP tab in the configuration editor and confirm the heap size in the Properties pane is sufficient (see Note below)
Click Generate Project Content to save and commit configuration changes
Drop the Quick Setup entry in Developer Assistance into the desired thread entry C file and update the items marked with TODO as necessary
Call the Quick Setup function from the thread entry function (or where desired)
At this point the project is now ready to build and run your GUIX Studio project. Please refer to the documentation for Azure RTOS GUIX and GUIX Studio for details on how to create and edit a GUI application.
Note
It is recommended to start with 8K-32K of heap to begin development. Actual heap use is typically far lower than this but must be characterized by the developer.
Examples
Basic Example
This is a basic example demonstrating how to get GUIX up and running given an existing GUIX Studio project. A template for this code is available in Developer Assistance for the GUIX Port module.
Note
GUIX manages the LCDC submodules internally; they do not need to be opened directly.
GX_WINDOW_ROOT * p_window_root;
void guix_user_start (void)
{
/* Initialize GUIX */
gx_system_initialize();
/* Configure GUIX Studio project main display and get a pointer to the root window */