Skip to content

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:


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

Used to convert an FFC/FPC connector to a micro HDMI connector.

USB Power Delivery (PD) AC Adapter &
USB Type-C PD Cable

Port: Connect to the USB Type-C port on the board

PC





Storage: 100GB or more free space on HDD/SSD
Memory: 8GB or more RAM
CPU: 4-core or more CPU

OS:
Linux: Ubuntu 22.04 LTS, 64-bit version
Windows: Windows 10 or 11

Micro SD Card & Reader



Type: SDHC
Speed Class: UHI-Class 10
Capacity: Minimum 4GB, recommended 8GB

A micro SD card is used to store the Linux system and prebuilt demo images from the HMI SDK.

HDMI Display & HDMI Cable






Port: Connect to the micro HDMI on the board

For touch displays, both HDMI and USB cables are required.
Standard: USB HID Compliant

No specific resolution is required.
The board automatically uses the resolutions supported by your HDMI display.
See How to Change the Display Resolution for more information.

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.

Standard*: USB HID Compliant

Audio Speaker

Port: 3.5mm mini plug connector

*Ethernet Cable




Used to connect the board to your host PC or network.

*Optional, only needed when developing using methods such as:
File transfer (binaries, logs, images)
SSH access (remote login)
Network access (internet or communication with other devices)

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)

    SW1-1SW1-2
    ONON
  • SW11 (on Common Carrier Board)

    SW11-1SW11-2SW11-3SW11-4
    ONONOFFON

Set DIP switch SW1 and SW11 as follows.

  • SW1 (on Module Board)

    SW1-1SW1-2SW1-3SW1-4SW1-5SW1-6
    ONONON*OFF*ON*Not used

    *These switches are not related to the settings required for this boot mode.

  • SW11 (on Common Carrier Board)

    SW11-1SW11-2SW11-3SW11-4
    ONONOFFON

Set DIP switch SW1 and SW11 as follows.

  • SW1 (on Module Board)

    SW1-1SW1-2SW1-3
    ONONON*

    *This switch is not related to the settings required for this boot mode.

  • SW11 (on Common Carrier Board)

    SW11-1SW11-2SW11-3SW11-4
    ONONOFFON
  • QSPI Boot Mode

Set DIP switch SW11 as follows for all boards.

SW11-1SW11-2SW11-3SW11-4
OFFOFFOFFON

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

Link to GitHub

LVGL Home Panel Demo

RZ/G2L, RZ/G2LC, RZ/G2UL

Link to GitHub

Chromium

Chromium Home Panel Demo

RZ/G2L, RZ/G2LC

Link to GitHub


Please follow the steps below to run the demo applications.

  1. Prepare the necessary equipment and configure the EVK DIP switches by following the instructions in Hardware Setup.

  2. 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.
  3. 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:

    /usr/share/demo-launcher/start_demo.sh 
    

    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.

    This demo application is implemented using LVGL.
    Click the buttons or use the sidebar to explore the available functions.

    For example, by clicking the Image Gallery button, you will see the screen shown below.

    For example, by clicking the Home Automation button, you will see the screen shown below.


    • 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

Link to GitHub

LVGL Sample Program for Audio Playback

RZ/G2L, RZ/G2LC

Link to GitHub

LVGL Sample Program for Video Playback

RZ/G2L

Link to GitHub

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).

  1. 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.

      cd RTK0EF0195F02310SJ_rzg2l/
      unzip toolchain-installer_rzg2l_hmi-sdk_v2.3.1.0.zip
      

      Then, install the toolchain.

      cd toolchain-installer_rzg2l_hmi-sdk_v2.3.1.0/
      sudo sh poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzg2l-toolchain-3.1.33.sh
      

      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.

      cd RTK0EF0195F02310SJ_rzg2lc/
      unzip toolchain-installer_rzg2lc_hmi-sdk_v2.3.1.0.zip
      

      Then, install the toolchain.

      cd toolchain-installer_rzg2lc_hmi-sdk_v2.3.1.0/
      sudo sh poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzg2lc-toolchain-3.1.33.sh
      

      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.

      cd RTK0EF0195F02310SJ_rzg2ul/
      unzip toolchain-installer_rzg2ul_hmi-sdk_v2.3.1.0.zip
      

      Then, install the toolchain as follows:

      cd toolchain-installer_rzg2ul_hmi-sdk_v2.3.1.0/
      sudo sh poky-glibc-x86_64-core-image-bsp-aarch64-smarc-rzg2ul-toolchain-3.1.33.sh
      

      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.

      cd ${WORK}/build/tmp/deploy/sdk/
      sudo sh poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzg2l-toolchain-3.1.33.sh
      

      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.

      cd ${WORK}/build/tmp/deploy/sdk/
      sudo sh poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzg2lc-toolchain-3.1.33.sh
      

      Target Board

      Toolchain Installer Script

      Location

      RZ/G2UL

      poky-glibc-x86_64-core-image-bsp-aarch64-smarc-rzg2ul-toolchain-3.1.33.sh

      ${WORK}/build/tmp/deploy/sdk/

      Install the toolchain.

      cd ${WORK}/build/tmp/deploy/sdk/
      sudo sh poky-glibc-x86_64-core-image-bsp-aarch64-smarc-rzg2ul-toolchain-3.1.33.sh
      

      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.

  2. Enable cross compiler.

    source <path-to-toolchain>/environment-setup-aarch64-poky-linux
    

    By default:

    source /opt/poky/3.1.33/environment-setup-aarch64-poky-linux
    
  3. Get the sample application source code.

    Navigate to the directory where you want to store the source code.

    git clone https://github.com/renesas-rz/rzg_hmi_sdk
    
  4. Go to the source code working directory.

    cd <path-to>/rzg_hmi_sdk/sample_app/<sample-application-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
  5. Build sample applications.

    make
    

    The executable binaries for the sample applications are built as follows:
    rzg_hmi_sdk/sample_app/<sample-application-directory>/<sample-application-binary>.

    Tip

    The executable binaries file name (<sample-application-binary>) is the same as its directory name.

    For example, for lvgl_sample_img_disp, the path to the built executable is:

    <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_img_disp/lvgl_sample_img_disp
    

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)

  1. 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.

  2. Check your EVK board’s IP address.

    Run the ip command on your EVK board as follows.

    ip a
    

    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 eth1
    

    RZ/G2L board's IP address is 192.168.0.32 (at eth1).

  3. 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 scp command.

    scp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_img_disp/lvgl_sample_img_disp root@<your-EVK-IP>:/home/root/
    

    scp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_audio_playback/lvgl_sample_audio_playback root@<your-EVK-IP>:/home/root/
    

    scp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_video_playback/lvgl_sample_video_playback root@<your-EVK-IP>:/home/root/
    

    Tip

    • We recommend copying the file to the /home/root directory.
    • Don’t forget to replace <your-EVK-IP> with your EVK's IP address.


    Copy resource files from your Linux PC (Ubuntu) using scp command.

    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:

    mkdir /usr/share/images/
    

    scp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_img_disp/sample/* root@<your-EVK-IP>:/usr/share/images/
    

    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:

    mkdir /usr/share/sounds/sample/
    

    scp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_audio_playback/sample/* root@<your-EVK-IP>:/usr/share/sounds/sample/
    

    Notice

    Please make sure the /usr/share/movies/ exists on your EVK board before using scp.
    If it does not exist, create it using the following command:

    mkdir /usr/share/movies/
    

    scp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_video_playback/sample/* root@<your-EVK-IP>:/usr/share/movies/
    

    Tip

    Don’t forget to replace <your-EVK-IP> with your EVK's IP address.

Option 2. Over SD Card

  1. 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.

  2. 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 lsblk command.

    For example, if the SD card is mounted at /media/user/rootfs.

    Copy the executable binary files.

    cp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_img_disp/lvgl_sample_img_disp /media/user/rootfs/home/root/
    

    cp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_audio_playback/lvgl_sample_audio_playback /media/user/rootfs/home/root/
    

    cp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_video_playback/lvgl_sample_video_playback /media/user/rootfs/home/root/
    

    Tip

    We recommend copying the file to the /home/root directory.


    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:

    mkdir /media/user/rootfs/usr/share/images/
    

    cp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_img_disp/sample/* /media/user/rootfs/usr/share/images/
    

    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:

    mkdir /media/user/rootfs/usr/share/sounds/sample/
    

    cp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_audio_playback/sample/* /media/user/rootfs/usr/share/sounds/sample/
    

    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:

    mkdir /media/user/rootfs/usr/share/movies/
    

    cp <path-to>/rzg_hmi_sdk/sample_app/lvgl/lvgl_sample_video_playback/sample/* /media/user/rootfs/usr/share/movies/
    

Step 3: Run the HMI Sample Applications

  1. Prepare the necessary equipment and configure the EVK DIP switches by following the instructions in Hardware Setup.

  2. 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.
  3. Set execute permission and run the sample applications on your EVK board.

    • LVGL Sample Applications

    Grant execute permission to the binary files.

    cd /home/root
    

    chmod +x lvgl_sample_img_disp
    

    Run the executable binary files.

    ./lvgl_sample_img_disp
    

    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.

    cd /home/root
    

    chmod +x lvgl_sample_audio_playback
    

    Run the executable binary files.

    ./lvgl_sample_audio_playback
    

    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.

    cd /home/root
    

    chmod +x lvgl_sample_video_playback
    

    Run the executable binary files.

    ./lvgl_sample_video_playback
    

    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.