HMI Applications¶
There are several ways to explore running HMI applications using the HMI SDK on RZ/G EVK boards.
This page will guide you through:
- Trying the out-of-box Demo Applications
- Building and deploying Sample Applications
After completing these, you can also develop your own HMI applications by referring to the instructions provided in Wiki.
Hardware Setup¶
Necessary Equipment¶
- Please prepare the following required equipment.
Equipment | Requirements | |
|---|---|---|
Included with RZ/G EVK | Target RZ/G EVK Board | |
USB Cable (for serial communication) | Port: Connect to micro USB Type-B (2.0) port on the board | |
*Parallel to HDMI Conversion Board | *Only for RZ/G2UL | |
USB Power Delivery (PD) AC Adapter & | Port: Connect to the USB Type-C port on the board | |
PC | Storage: 100GB or more free space on HDD/SSD | |
Micro SD Card & Reader | Type: SDHC | |
HDMI Display & HDMI Cable | Port: Connect to the micro HDMI on the board | |
USB Hub | Used when multiple USB devices are needed. | |
USB Keyboard | Standard: USB HID Compliant | |
USB Mouse | Standard: USB HID Compliant | |
*USB Camera | Only for RZ/G2L and RZ/G2LC. | |
Audio Speaker | Port: 3.5mm mini plug connector | |
*Ethernet Cable | Used to connect the board to your host PC or network. | |
Tip
A Windows PC can be used for flashing an SD card and debugging via a serial connection.
For further development and deployment, use a Linux PC.
EVK Peripheral Setup¶
Please set up the necessary equipment referring to the EVK peripheral diagram below.
Tip
- For eSD boot mode, insert the microSD card into the sd ChC slot (CN3) on the module board; for QSPI boot mode, insert the microSD card into the micro SD slot (CN10) on the common carrier board.
- If you use a touch-panel HDMI display, in addition to the HDMI cable, a USB cable connected to USB 1 (CN12) is required to enable touch functionality.
- For Ethernet connection, RZ/G2L and RZ/G2UL support Ethernet 0 (CN9) and Ethernet 1 (CN8), while RZ/G2LC supports only Ethernet 0 (CN9).
EVK DIP Switch Setup¶
- eSD Boot Mode
Set DIP switch SW1 and SW11 as follows.
SW1 (on Module Board)
SW11 (on Common Carrier Board)
Set DIP switch SW1 and SW11 as follows.
SW1 (on Module Board)
SW11 (on Common Carrier Board)
- QSPI Boot Mode
Set DIP switch SW11 as follows for all boards.
| SW11-1 | SW11-2 | SW11-3 | SW11-4 |
|---|---|---|---|
| OFF | OFF | OFF | ON |
Notice
Firmware (bootloader) updates are required for QSPI boot modes. Please follow the steps provided in How to Update Firmware (Flash Writer and Bootloaders).
Note
Please refer to How to Boot from a microSD Card in QSPI Boot Mode for details.
Demo Applications¶
This section explains how to run the HMI demo applications and provides detailed introductions for each one.
The HMI SDK Demo Launcher starts automatically when the EVK boots. Currently, it includes the following prebuilt demo applications. If you want to customize them, their source code can be downloaded from the GitHub links listed in the table below.
Type | Demo Applications | Target Device | Source Code URL |
|---|---|---|---|
LVGL | LVGL Benchmark Demo | RZ/G2L, RZ/G2LC, RZ/G2UL | |
LVGL Home Panel Demo | RZ/G2L, RZ/G2LC, RZ/G2UL | ||
Chromium | Chromium Home Panel Demo | RZ/G2L, RZ/G2LC |
Please follow the steps below to run the demo applications.
Prepare the necessary equipment and configure the EVK DIP switches by following the instructions in Hardware Setup.
Insert the bootable microSD card into the microSD card slot for eSD boot mode (sd ChC CN3 port on Module Board), and then power on the EVK board.
Tip
- Please refer to the EVK Peripheral Setup for the location of the microSD card slot.
- Press and hold the power button (red button, SW9) for 1 second to turn on the EVK board, and for 2 seconds to turn it off.
The HMI SDK Demo Launcher launches automatically once the device is fully booted.
Right after boot, you will see the launch window as shown below.
After a few seconds, the HMI SDK Demo Launcher will appear.
Click the corresponding button to try each demo application we provide.Tip
If you want to exit a demo application and return to the HMI SDK Demo Launcher, you can either
* restart your EVK board by press reset button (blue button, SW10) or
* run the following command in your board terminal to relaunch it:Note that this is temporary behavior, and we will improve it in future releases.
- LVGL Demo Applications
This demo application is implemented using LVGL, and it includes the following tools for performance testing.
Please click each tool and follow the detailed instructions to try them.
After you finish trying the tools, click the Quit button at the top-right corner to exit.- Chromium Demo Applications
This demo application is implemented using Chromium, and it presents an HTML5 single-page home panel interface.
Click the buttons or use the sidebar to explore the available functions.For example, by clicking the Video Player button, you will see the screen shown below.
Tip
Please refresh the browser before using the seek bar in the Video Player.
For example, by clicking the Home Automation button, you will see the screen shown below.
For RZ/G2L and RZ/G2LC, the live camera function is also available.The image below is captured using USB Camera.
Please switch the camera display mode using the control on top.
Sample Applications¶
This section explains how to build, deploy, and run the HMI sample applications, as well as provides detailed introductions for each one.
We have prepared the following sample applications.
Their source code can be downloaded from the GitHub links listed in the table below.
Type | Sample Applications | Target Device | Source Code URL |
|---|---|---|---|
LVGL | LVGL Sample Program for Image Display | RZ/G2L, RZ/G2LC, RZ/G2UL | |
LVGL Sample Program for Audio Playback | RZ/G2L, RZ/G2LC | ||
LVGL Sample Program for Video Playback | RZ/G2L |
The executable binaries are also available in the bin directory of each sample application, so you can run the samples without building them yourself. If you choose to use the binaries, simply download them, skip Step 1, and start from Step 2: Deploy Sample Applications.
Step 1: Build Sample Applications¶
Tip
This step requires a Linux PC (Ubuntu).
Install cross-compilation toolchain.
When Using the HMI SDK Package
If you download the HMI SDK Package and follow the Getting Started setup instructions, you will find the toolchain installer script included in the package. Follow the steps below to install the toolchain for your board.
Target Board
Toolchain Installer Script
Location
RZ/G2L
poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzg2l-toolchain-3.1.33.sh
toolchain-installer_rzg2l_hmi-sdk_v2.3.1.0.zip
Unzip the package, and extract the installer.
Navigate to the directory where the HMI SDK Package was extracted.
Then, install the toolchain.
Target Board
Toolchain Installer Script
Location
RZ/G2LC
poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzg2lc-toolchain-3.1.33.sh
toolchain-installer_rzg2lc_hmi-sdk_v2.3.1.0.zip
Unzip the package, and extract the installer.
Navigate to the directory where the HMI SDK Package was extracted.
Then, install the toolchain.
Target Board
Toolchain Installer Script
Location
RZ/G2UL
poky-glibc-x86_64-core-image-bsp-aarch64-smarc-rzg2ul-toolchain-3.1.33.sh
toolchain-installer_rzg2ul_hmi-sdk_v2.3.1.0.zip
Unzip the package, and extract the installer.
Navigate to the directory where the HMI SDK Package was extracted.
Then, install the toolchain as follows:
Tip
Please set the directory for installing the toolchain.
The default
<path-to-toolchain>is/opt/poky/3.1.33, which is used in the instructions below.
If you set the target directory manually, please remember to update the path accordingly in the next step.When Using the HMI SDK Yocto Build Package
If you download the HMI SDK Yocto Build Package, please ensure that you have completed Step 2-10: Create the SDK toolchain in Building the HMI SDK with Yocto. Then follow the steps below to install the toolchain for your board.
Tip
${WORK}refers to the directory you set in Step 2-3. Set environment variables in Building the HMI SDK with Yocto.Target Board
Toolchain Installer Script
Location
RZ/G2L
poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzg2l-toolchain-3.1.33.sh
${WORK}/build/tmp/deploy/sdk/
Install the toolchain.
Target Board
Toolchain Installer Script
Location
RZ/G2LC
poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzg2lc-toolchain-3.1.33.sh
${WORK}/build/tmp/deploy/sdk/
Install the toolchain.
Tip
Please set the directory for installing the toolchain.
The default
<path-to-toolchain>is/opt/poky/3.1.33, which is used in the instructions below.
If you set the target directory manually, please remember to update the path accordingly in the next step.
Enable cross compiler.
By default:
Get the sample application source code.
Navigate to the directory where you want to store the source code.
Go to the source code working directory.
Tip
Existing
<sample-application-directory>entries are listed in the table below.<sample-application-directory>Description lvgl/lvgl_sample_img_dispLVGL Sample Application for Image Display lvgl/lvgl_sample_audio_playbackLVGL Sample Application for Audio Playback lvgl/lvgl_sample_video_playbackLVGL Sample Application for Video Playback Build sample applications.
The executable binaries for the sample applications are built as follows:
rzg_hmi_sdk/sample_app/<sample-application-directory>/<sample-application-binary>.
Step 2: Deploy Sample Applications¶
Tip
- This step requires a Linux PC (Ubuntu).
- For operations that require entering commands on the EVK board, you can use the on-screen terminal at the top-left corner of the display, or connect remotely using an terminal emulator such as Tera Term.
Option 1. Over Ethernet (using SCP)¶
Connect the EVK board to your Linux PC and boot it.
Connect an Ethernet cable between the EVK’s RJ45 port and your Linux PC.
Note
Refer to EVK Peripheral Setup for details.
RJ45 ports Ethernet 0 (CN9) and Ethernet 1 (CN8) are available; either port can be used.
RJ45 ports is Ethernet 0 (CN9).
RJ45 ports Ethernet 0 (CN9) and Ethernet 1 (CN8) are available; either port can be used.
Press and hold the power button (red button, SW9) for 1 second to turn on the EVK board.
Check your EVK board’s IP address.
Run the
ipcommand on your EVK board as follows.Tip
For example, if the RZ/G2L board is connected to the local network through the CN8 Ethernet port:
root@smarc-rzg2l:~# ip a | grep eth 5: eth0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether f2:d6:18:24:f0:6b brd ff:ff:ff:ff:ff:ff 6: eth1: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 72:26:f0:8b:64:59 brd ff:ff:ff:ff:ff:ff inet 192.168.0.32/24 brd 192.168.0.255 scope global dynamic eth1RZ/G2L board's IP address is
192.168.0.32(ateth1).Copy the executable binary files and resource files to your EVK board (external SD card storage).
Copy the executable binary files from your Linux PC (Ubuntu) using
scpcommand.Tip
- We recommend copying the file to the
/home/rootdirectory. - Don’t forget to replace
<your-EVK-IP>with your EVK's IP address.
Copy resource files from your Linux PC (Ubuntu) usingscpcommand.Notice
Please make sure the
/usr/share/images/exists on your EVK before using scp.
If it does not exist, create it using the following command:Notice
Please make sure the
/usr/share/sounds/sample/exists on your EVK board before using scp.
If it does not exist, create it using the following command:Tip
Don’t forget to replace
<your-EVK-IP>with your EVK's IP address.- We recommend copying the file to the
Option 2. Over SD Card¶
Insert your SD card into the Linux PC and mount it.
Notice
Make sure to turn off your EVK board before ejecting the SD card.
Press and hold the power button for 2 seconds to turn it off.Copy the executable binary files and resource files to your SD card.
Tip
Follow the instructions in Step 4 in Option 2 to check where your SD card is mounted using the
lsblkcommand.For example, if the SD card is mounted at
/media/user/rootfs.Copy the executable binary files.
Tip
We recommend copying the file to the
/home/rootdirectory.
Copy resource files.Notice
Please make sure the
/usr/share/images/exists on your SD card before copying.
If it does not exist, create it using the following command:Notice
Please make sure the
/usr/share/sounds/sample/exists on your SD card before using scp.
If it does not exist, create it using the following command:Notice
Please make sure the
/usr/share/movies/exists on your SD card before using scp.
If it does not exist, create it using the following command:
Step 3: Run the HMI Sample Applications¶
Prepare the necessary equipment and configure the EVK DIP switches by following the instructions in Hardware Setup.
Insert the bootable microSD card created in Step 2 into the microSD card slot, and then power on the EVK board.
Tip
- Please refer to the EVK Peripheral Setup to locate the microSD card slot based on your selected boot mode.
- Press and hold the power button (red button, SW9) for 1 second to turn on the EVK board, and for 2 seconds to turn it off.
Set execute permission and run the sample applications on your EVK board.
- LVGL Sample Applications
Grant execute permission to the binary files.
Run the executable binary files.
The launched sample application is shown below.
This sample application is implemented using LVGL and can display image files in BMP, JPG, PNG, and GIF formats.Click the button to display the image from the source file.
To exit, simply close the window or press Ctrl+C in the EVK board terminal.
Grant execute permission to the binary files.
Run the executable binary files.
The launched sample application is shown below.
This sample application is implemented using LVGL and can play audio files in mp3, AAC, and WAV formats.Click the button to start, stop, or pause the audio from the source file.
To exit, simply close the window or press Ctrl+C in the EVK board terminal.
Grant execute permission to the binary files.
Run the executable binary files.
The launched sample application is shown below.
This sample application is implemented using LVGL, and it can play movie files in MP4 format.Click the button to start, stop, or pause the video from the source file.
To exit, simply close the window or press Ctrl+C in the EVK board terminal.























